Showing posts with label gcc cpp macro. Show all posts
Showing posts with label gcc cpp macro. Show all posts

Wednesday, July 25, 2007

Predefined Macros in gcc

gcc (well cpp, the preprocessor) provides several predefined macros. Many of these are platform independent, for instance __FILE__ and __LINE__. Others are platform dependent (or "system-specific" as the gcc manual puts it). So how do you know what your particular platform defines? Try this:
cpp -dM /dev/null I stumbled across this trick the other day on Apple's mailing lists archives.