This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: C++ conversion status update


On 12/16/2015 08:29 PM, Simon Marchi wrote:
> On 16 December 2015 at 15:15, Pedro Alves <palves@redhat.com> wrote:
>> Simon, do you see this one?
> 
> Yes, but it doesn't seem to make the compilation fail on its own
> (despite stating it's an error).  I only see it when the build fails
> because of another error.  I figured that that flag was introduced gcc
> version, and that it doesn't hurt if it's not recognized.

Ah, yes, that's it.  We have code in configure.ac that tries to
detect whether the compiler supports each warning and suppress it
it no, but it's getting fooled by:

"When an unrecognized warning option is requested (e.g., -Wunknown-warning), GCC emits a
diagnostic stating that the option is not recognized. However, if the -Wno- form is used, the
behavior is slightly different: no diagnostic is produced for -Wno-unknown-warning unless other
diagnostics are being produced. This allows the use of new -Wno- options with old
compilers, but if something goes wrong, the compiler warns that an unrecognized
option is present."

That's from https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html.

I think we can handle this by making that warning-support test code
check whether -Wfoo works when we actually want -Wno-foo.

Thanks,
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]