C++ conversion status update

Pedro Alves palves@redhat.com
Wed Dec 16 22:10:00 GMT 2015

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.

Pedro Alves

More information about the Gdb mailing list