I have run into a bug with gcc v3.4.4 and which to put an #ifdef in my code to work around the bug for only that version of the compiler.
What are the GCC compiler p
__GNUC__, __GNUC_MINOR__ and __GNUC_PATCHLEVEL__.
For instance, GCC 4.0.1 will do:
#define __GNUC__ 4
#define __GNUC_MINOR__ 0
#define __GNUC_PATCHLEVEL__ 1
Here is a little command line that is nice to remember when you are wondering which are the predefined preprocessor directives defined by the GNU GCC compiler under your current programming environment:
gcc -E -dM - < /dev/null |less