This is the mail archive of the gcc-help@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: Predefined C defines


Hi Rod,

You can generate a list of the built in defines by doing this:

echo '' | gcc -E -dM -x c - | sort

echo ''   -- for our mock empty source file
gcc       -- our favorite toolchain driver (or g++)
-E        -- preprocess only
-dM       -- display defines
-x c      -- treat as C (or -x C++)
-         -- use stdin as the source file
sort      -- put the defines in more human readable order

You can use that trick with particular #include files to see what the
vestigial #defines are (vestigial because it won't list #undef'd
identifiers).

HTH,
--Eljay


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