This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: C++ conversion status update
- From: Pedro Alves <palves at redhat dot com>
- To: Simon Marchi <simon dot marchi at polymtl dot ca>
- Cc: "Jose E. Marchesi" <jose dot marchesi at oracle dot com>, Yao Qi <qiyaoltc at gmail dot com>, "gdb at sourceware dot org" <gdb at sourceware dot org>
- Date: Wed, 16 Dec 2015 22:10:52 +0000
- Subject: Re: C++ conversion status update
- Authentication-results: sourceware.org; auth=none
- References: <565460FB dot 6070103 at redhat dot com> <86zixdnlfg dot fsf at gmail dot com> <566F13D4 dot 9000900 at redhat dot com> <877fkglytf dot fsf at oracle dot com> <5671C65E dot 3070503 at redhat dot com> <CAFXXi0k5oe3nvQRATv1T-fh0+m_jnWBPZHLFzBK6PzqcSzJedQ at mail dot gmail dot com>
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