List of all defines?
Rupert Wood
me@rupey.net
Tue Jan 29 23:48:00 GMT 2002
Steve G wrote:
> I am trying to setup FlexeLint to check source code
> and I need to setup all of the defines so that it
> makes all the correct branches as it parses the std c
> library headers.
The simplest way is to perform a simple compile with the verbose flag,
-v. The first operation performed by the compiler driver will be to
invoke the compiler main with a full set of #defines on the command
line, e.g.:
/home/rmw/local/lib/gcc-lib/hppa1.1-hp-hpux11.00/3.0.4/cc1 -lang-c
-v -D__GNUC__=3 -D__GNUC_MINOR__=0 -D__GNUC_PATCHLEVEL__=4 -Dhppa
-Dhp9000s800 -D__hp9000s800 -Dhp9k8 -DPWB -Dhpux -Dunix -D__hppa__
(etc.)
You could also collate the defines from the sections of the compiler
specs file installed in lib/gcc-lib/<triple>/<version>.
Many of the defines are system specific; if you want to find them in the
GCC source code instead then you should look in the relevant
subdirectory of gcc/config.
Hope that helps,
Rup.
More information about the Gcc-help
mailing list