bug-gnulib
[Top][All Lists]
Advanced

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

Re: Add new macro gl_WARN_ADD_MULTIPLE


From: Bruno Haible
Subject: Re: Add new macro gl_WARN_ADD_MULTIPLE
Date: Thu, 02 May 2019 21:12:47 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-141-generic; KDE/5.18.0; x86_64; ; )

Hi Tim,

> > Does this implementation of manywarnings support only the case where
> > you want all possible warnings except an explicitly specified set?
> > Or also the case where you want only an explicitly specified set of
> > warnings?
> 
> It supports the first approach only, in detail
> - all warnings except a given subset
> - you can add warnings, e.g. you might need -Wno-... for warnings that
> are implicitly enabled. Especially with clang where '--help=warnings -Q'
> isn't available. Here we use -Weverything and you have to add options to
> silence some of the overly expressive warnings.

OK, but a similar thing can be done for the opposite case (just with no
-Weverything). So we could have two macros
  gl_MANYWARN_GCC_ALL_EXCEPT([warnings to disable])
  gl_MANYWARN_GCC_ENABLE([warnings to enable])

> It works only with gcc 4.3+.

We can keep the existing, slower code around and use it for GCC versions
< 4.2.

> > Or also the case where you want only an explicitly specified set of
> > warnings?
> 
> If you need that, why not just set CFLAGS ? Or maybe I don't understand
> exactly...

Because GCC freaks out when you pass it warning options that it does not
understand. The whole point of this testing is to pass to GCC only those
options that will not make it freak out.

Bruno




reply via email to

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