[Top][All Lists]

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

Re: AC_PROG_CC: how to distinguish clnag from gcc?

From: Russ Allbery
Subject: Re: AC_PROG_CC: how to distinguish clnag from gcc?
Date: Mon, 08 Feb 2021 09:10:58 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Sébastien Hinderer <> writes:

> Did you notice important changes in the supported warnings between
> different versions of the same compiler?

Yes, mostly that new version of the compiler add new warnings, and
sometimes new warning flags.  I probe for whether the compiler supports
each flag during Autoconf, and periodically I review the release notes of
the two compilers and add new interesting warning flags.

> Are there many warnings in common between (at least one version of)
> clang and (at least one version of) gcc, actually?

I think there is some overlap between the flags (-W -Wall are the same,
for instance), although I didn't investigate in detail because I started
down the -Weverything with a blacklist path with Clang early on and GCC
doesn't (so far as I know) support that.

For the record, apparently the Clang folks don't really want people to use
-Weverything.  I still do anyway, for maintainer builds, and have not had
any real problems with that (and have been grateful to pick up new
warnings automatically), but it shouldn't be a default.

Russ Allbery (             <>

reply via email to

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