Re: AC_PROG_CC: how to distinguish clnag from gcc?

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

 



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





[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux