yet another strange message from LLVM/Clang on FreeBSD 13 i686
Vincent Lefevre
vincent at vinc17.net
Mon Aug 24 10:03:40 UTC 2020
On 2020-08-24 10:52:09 +0200, Hans Åberg wrote:
> > On 24 Aug 2020, at 10:46, Torbjörn Granlund <tg at gmplib.org> wrote:
> >
> > Hans Åberg <haberg-1 at telia.com> writes:
> >
> > Clang has a pedagogical approach, intended to make it easy for newbies
> > which have not bothered learning C/C++, and breaks the rule to not
> > issue diagnostics for perfectly legal code unless called for.
> >
> > - - -
> >
> > For your case, you might add
> > #pragma clang diagnostic ignored "-Wkeyword-macro"
> >
> > Modifying the code of a non-trivial project in order to placate clang is
> > a wild goose chase; with every release, the subset of the language C
> > clang accepts gets smaller.
>
> Right. One way to put it is that the developers of Clang want the
> languages C/C++ to be something they are not.
Note that there is nothing wrong to have a warning for dubious
constructs. But a fatal error for something valid is not acceptable.
If it is the end user who blindly added -Werror, then that's the
user's fault. But if this one is part of -pedantic-errors and/or
-Werror=pedantic (which are not equivalent in GCC!), then this
should be regarded as a compiler bug.
--
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
More information about the gmp-discuss
mailing list