n8blog
distraction in action

Like my work? Check out HexaLex, my game for iPhone & iPod Touch. It's a crossword game like Scrabble, but played with hexagonal tiles. http://www.hexalex.com

Here's a useful tidbit that I thought I would share. If you want to find out all of the built-in #define's that GCC gives you, try this:

touch dummy_file.c; gcc -E -dM dummy_file.c

On recent versions of GCC this will give you a list of all the predefined macros. On older systems (I don't know how far back) you can try this:

gcc -dumpspecs

It's harder to read, but many of the platform-specific macros are in there.

  • Share/Bookmark

  Comments:

1. Drew replies:

File-free version:

echo ” | gcc -E -dM

2. Todd replies:

File-free version that works for me:


echo | gcc -E -dM -

The filename ‘-’ (hypen) means read from stdin.

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

Please type this word with the letters reversed: live

Like my work? Check out HexaLex, my game for iPhone & iPod Touch. It's a crossword game like Scrabble, but played with hexagonal tiles. http://www.hexalex.com