On Tue, Jul 01, 2008 at 05:34:17PM +0000, x z wrote: > > I think an important point was missed in the discussion. Some seem to focus > on the dishonest definition of __GNUC__ by non-GNU C compilers. That was not > my point. My point is that if __GNUC__ is defined by CPP, not the GNU C > compiler proper, (and this seems to be supported by the CPP Manual,) and any > (non-GNU) C compiler can use CPP, then those non-GNU C compilers would > "inadverdently" define __GNUC__ and lead people to believe that they are GNU > C. That is why I think the GNU C compiler should define a macro > independently from CPP. Or, alternatively, __GNUC__ should be defined by the > GCC compiler proper, not CPP.
Perhaps you can use 'defined(__GNUC__) && !defined(__INTEL_COMPILER)' In www.intel.com/cd/software/products/asmo-na/eng/284736.htm (warning: a PDF, despite the .htm extension (!)): "A new option has been added, -gcc-sys, which is similar to -no-gcc, except that the GNU macros are only defined when preprocessing system include headers files, so these will compile correctly." Googling "Intel C++ __GNUC__" shows several major projects have been affected by this icc misfeature. -Jack