GDB 8.1 build error

Simon Marchi
Fri Apr 27 20:24:00 GMT 2018

On 2018-04-27 16:00, Pedro Alves wrote:
> On 04/27/2018 08:18 PM, Simon Marchi wrote:
>> On 2018-04-27 15:08, Pedro Alves wrote:
>>> Oh, wait....  Your build line has no "-W" at all, it has "-w" 
>>> instead??
>>> How did that happen?
>> When --disable-build-warnings is used, we don't put any -W/-Wno- 
>> flags:
> But then, we add "-w", and I'm surprised that "-w" did not disable
> all warnings, including "-Wc++11-narrowing".  "-w" is supposed to mean
> disable all warnings.  At least, that's how GCC behaves.
> Could that be a clang bug?

On clang at least, -Wnarrowing seems to generate an error by default, so 
-w doesn't affect it.  You get:

   no flag: error
   -Wno-error=narrowing: warning
   -Wno-error=narrowing -w: silent

So in this case, we would still need either -Wno-error=narrowing or 

We can test if gcc behaves the same, we just need something that is an 
error by default but we can downgrade to a warning.  Do you have an idea 
of such diagnostic?


More information about the Gdb mailing list