emacs-devel
[Top][All Lists]
Advanced

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

Re: master 13c8cc58bb: Enable warnings when building as a developer with


From: Paul Eggert
Subject: Re: master 13c8cc58bb: Enable warnings when building as a developer with
Date: Fri, 8 Apr 2022 14:58:02 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0

The impression I got from postings around here lead me to think that
clang posing as an old GCC is something specific to macOS.
Is that indeed the case?

No, clang poses as old GCC everywhere. If you run "clang -x c /dev/null -dM -E" on Fedora 35, you'll see:

#define __GNUC_MINOR__ 2
#define __GNUC_PATCHLEVEL__ 1
#define __GNUC_STDC_INLINE__ 1
#define __GNUC__ 4

and a bunch of other GCC-specific macros. As I understand it, the GCC developers have asked the Clang developers to not pretend to be GCC, but the Clang developers have ignored the request.

In my experience, if you enable warnings, Clang generates too many false alarms. In particular, I can't build Emacs with Clang and with --enable-gcc-warnings, because of the false alarms it generates. So I just now suggested privately to Mattias to revert that recent change to Emacs configure.ac, so that --enable-gcc-warnings is the default for developers only if they're using GCC. It's not worth our time to worry about the Clang warnings, since GCC warnings work as well or better.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]