Re: AC_PROG_CC wrongly setting $GCC=yes while clang is used

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bastien Chevreux <bach@xxxxxxxxxxxx> writes:

> Would it be worthwhile to forward this to the GNU compiler maintainers
> so that they could maybe correct their course by maybe introducing a
> define which is ‘reserved’ for telling that, yes, this is indeed a GNU
> compiler?

That's what __GNUC__ was for.  However, from the perspective of the
authors of the other compilers, this is a bug -- they want to be able to
compile code that uses GCC extensions, which is why they're implementing
those extensions.  So they *want* their compiler to be detected as capable
of supporting GCC extensions.

So, if GCC added a new define, the other compilers would just start
defining that symbol as well.

I'm afraid the only hope you have, if you depend on extensions that are
not implemented by other compilers, is to test explicitly for those
extensions.

-- 
Russ Allbery (eagle@xxxxxxxxx)              <http://www.eyrie.org/~eagle/>

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf





[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux