On 09/09/14 00:26, Russ Allbery wrote: > 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. It should also be noted that among those compilers which define __GNUC__ but may not have all the features some author expects are earlier versions of gcc. I'd rather not rely on $GCC for anything and rather test the feature instead. Regards, Thomas
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ Autoconf mailing list Autoconf@xxxxxxx https://lists.gnu.org/mailman/listinfo/autoconf