This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Predefined C defines
- From: John Love-Jensen <eljay at adobe dot com>
- To: <rod dot niner at gm dot com>, MSX to GCC <gcc-help at gcc dot gnu dot org>
- Date: Tue, 15 Aug 2006 11:33:01 -0500
- Subject: 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