This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Intel compiler 8.0 pretends to be gcc 3.2.
- From: "H. J. Lu" <hjl at lucon dot org>
- To: Martin Buchholz <martin at xemacs dot org>
- Cc: gcc at gcc dot gnu dot org
- Date: Sat, 21 Jun 2003 08:33:25 -0700
- Subject: Re: Intel compiler 8.0 pretends to be gcc 3.2.
- References: <16116.28055.925439.4302@gargle.gargle.HOWL>
On Sat, Jun 21, 2003 at 07:37:11AM -0700, Martin Buchholz wrote:
> You folks should be aware that gcc is no longer the only compiler that
> defines __GNUC__. Version 8 of icc for Linux does this as well.
>
> In addition to defining the expected macro
>
> __INTEL_COMPILER
>
> it also defines these surprising macros:
>
> -D__GNUC__=3 \
> -D__GNUC_MINOR__=2 \
> -D__GNUC_PATCHLEVEL__=0 \
> -D__GNUG__=3 \
>
> Given the high degree of gcc-compatibility that icc attains, these
> definitions are understandable, but likely to be controversial.
>
> The test
>
> #ifdef __GNUC__
>
> no longer conclusively identifies gcc.
>
> I have had to change one such test to
>
> #if defined (__GNUC__) && !defined (__INTEL_COMPILER)
>
> to enable compilation with both gcc and icc in my own code,
> where icc's emulation of gcc is imperfect.
>
Do you know what part is imperfect? As far as I know, icc 8.0 doesn't
support nested functions nor asm statements on ia64. I am working on
a gcc patch to support icc 8.0 ia64 intrinsics so that asm statements
can be avoid.
H.J.