This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Dealing with compilers that pretend to be GCC
Hi Vincent,
Vincent Lefevre <vincent+gcc@vinc17.org> skribis:
> For ICC, one can test __ICC. For instance, here's what we have in mpfr.h
> (for the use of __builtin_constant_p and __extension__ ({ ... })):
>
> #if defined (__GNUC__) && !defined(__ICC) && !defined(__cplusplus)
Yeah, but itâs a shame that those compilers define __GNUC__ without
supporting 100% of the GNU C extensions. With this approach, you would
also need to add !defined for Clang, PGI, and probably others.
Thanks,
Ludoâ.