autoconf
[Top][All Lists]
Advanced

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

Re: AC_PROG_CC: how to distinguish clnag from gcc?


From: Paul Eggert
Subject: Re: AC_PROG_CC: how to distinguish clnag from gcc?
Date: Mon, 8 Feb 2021 12:58:42 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1

On 2/7/21 11:46 PM, Sébastien Hinderer wrote:
Did you notice important changes in the supported warnings between
different versions of the same compiler?

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

The short answers to those two questions are "yes" and "yes".

I don't know of anybody who's come up with a comprehensive list of which compiler versions support which warnings correctly. Such a list would be tricky to do, as some warnings imply others, some warnings are language-dependent, and the warning dependencies can also change from version to version. At Gnulib we gave up trying to keep track of all the warnings (even though we were just doing GCC, not clang) and are currently using only the warnings listed here:

https://git.savannah.gnu.org/cgit/gnulib.git/tree/m4/manywarnings.m4
https://git.savannah.gnu.org/cgit/gnulib.git/tree/m4/manywarnings-c++.m4

with further documentation here:

https://git.savannah.gnu.org/cgit/gnulib.git/tree/build-aux/gcc-warning.spec



reply via email to

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