This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Where are the Predefined Macros defined?


On Sep 29 2018, bx L <lbxlbxlbxlbxlbx@gmail.com> wrote:

>      I notice that gcc has some predefined macros, which can be
> obtained with " gcc -dM -E - < /dev/null". I guess many of them are
> machine-specified, such as __LDBL_MANT_DIG__. However, I can't find
> where these macros are defined when browsing GCC's source codes. I'm
> very curious about how these macros are defined.

Look for builtin_define, then inspect the context to see where the macro
names are constructed.  For example, c-family/c-cppbuiltin.c has a lot
of them.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]