Re: Predefined C defines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux