Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8459601
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:22:34+00:00 2026-06-10T13:22:34+00:00

When I read the header stddef.h provided by gcc, I have found a possible

  • 0

When I read the header stddef.h provided by gcc, I have found a possible mistake. At first, I’m sure it’s a mistake. But after I have read the header stddef.h of three different versions of gcc(3.4.5, 4,4,3 and 4,6,3), I found they are same at the point, so I’m not sure. Perhaps I’m wrong.

#if (!defined(_STDDEF_H) && !defined(_STDDEF_H_) && !defined(_ANSI_STDDEF_H) \
     && !defined(__STDDEF_H__)) \
    || defined(__need_wchar_t) || defined(__need_size_t) \
    || defined(__need_ptrdiff_t) || defined(__need_NULL) \
    || defined(__need_wint_t)

The above code is the beginning of stddef.h. The following is the ending of stddef.h. There are a pair.

#endif /* !_STDDEF_H && !_STDDEF_H_ && !_ANSI_STDDEF_H && !__STDDEF_H__
      || __need_XXX was not defined before */

I think that there is a mistake in the line:

      || __need_XXX was not defined before */

Should the word “not” be deleted?

It is easy, but if it’s mistake, why hasn’t the mistake been found and changed?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T13:22:35+00:00Added an answer on June 10, 2026 at 1:22 pm

    Not really a bug, I think, and barely even a cosmetic wart.

    1. It is in a comment and has no effect on what the compiler sees (the pre-processor eliminates the comments).

    2. The comment is saying ‘none of these various defines were defined before’.

      That is: (_STDDEF_H was not defined and _STDDEF_H_ was not defined and _ANSI_STDDEF_H was not defined and __STDDEF_H__ was not defined) OR if we still need one of the various __need_XXX features, then the body of the header was processed. Before the || terms were added, it was clearer; they were probably added later than the main set of defined symbols identifying the header file.

    Granted, the language in the comment could be made more precise, but the abbreviation is fairly typical of the way it is done. It is clear which #if the #endif is referring to. You can submit a suggested patch, but don’t be surprised if nothing much happens with it. If it was my header and I needed that much complexity, I’d probably use something like:

    #endif /* (!_STDDEF_H && !_STDDEF_H_ && !_ANSI_STDDEF_H && !__STDDEF_H__) || __need_XXX */
    

    and I might be tempted to use:

    #endif /* (!_STDDEF_H && !_STDDEF_H_ && ...) || __need_XXX || ... */
    

    There’s a lot of history in those comments and defines, no doubt. System headers are not a good place to learn from. They tend to be inscrutable because they’re driven in multiple directions simultaneously by a diverse set of standards, and they accrete complications over time as the standards evolve.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have read the header of CommonCryptor.h , and only I can find kCCAlgorithmAES128
I have the following test data frame : test <- read.table(header = TRUE, text
I am trying to read the header of an SWF file using NSData. According
I read that when you don't have access to the web server's headers you
Read about the issue in this stackoverflow question . Still have the same issue
I read an article about a regular expression to detect base64 but when I
I read this question in stackoverflow. The excerpt answer provided by bbum is below:
The first row of my data file is the headers for the three (or
I'm trying to read header of ID3V2 of mp3 files. I can get/print ID3
I am using the following method to read header names in a table and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.