This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 0/5] Remove a few hurdles of compiling with clang
- From: Pedro Alves <palves at redhat dot com>
- To: Andrew Pinski <pinskia at gmail dot com>, Simon Marchi <simon dot marchi at polymtl dot ca>
- Cc: Eli Zaretskii <eliz at gnu dot org>, Yao Qi <qiyaoltc at gmail dot com>, Simon Marchi <simon dot marchi at ericsson dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Mon, 12 Jun 2017 17:35:41 +0100
- Subject: Re: [PATCH 0/5] Remove a few hurdles of compiling with clang
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=palves at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 24DFFC04B927
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 24DFFC04B927
- References: <1497124689-11842-1-git-send-email-simon.marchi@ericsson.com> <83tw3n5jyk.fsf@gnu.org> <86tw3labb0.fsf@gmail.com> <83a85d5l4n.fsf@gnu.org> <93eb64489ac9d53665a144ddf5a966d5@polymtl.ca> <CA+=Sn1knkY=mqawCTpn4A=_rrgW6=+AaBn=evnv6uJFCuQb4Jw@mail.gmail.com>
On 06/12/2017 05:23 PM, Andrew Pinski wrote:
> On Mon, Jun 12, 2017 at 8:54 AM, Simon Marchi <simon.marchi@polymtl.ca> wrote:
>> - gdb: Add -Wno-mismatched-tags: We already have a system that tests which
>> warning flags are supported by the current compiler, so this flag will not
>> be included in the builds with GCC. So it's neutral for GCC, and improves
>> the situation for Clang with almost no effort.
>
> This warning is a bug in clang and really should not be warned about
> in either -Wall or -Wextra. I have been complaining about this since
> clang added this option.
IIRC, the reason this warning exists is because Microsoft's compilers
mangle "struct" and "class" differently, so for projects that
want to be portable to that compiler, it's a helpful warning.
(Whether that should ever be part of -Wall is a separate matter...)
I don't think we'd want to bend backwards to support MSVC
though. It's so non-conforming that it's scary. Disabling
that warning is the right thing to do, IMO.
Thanks,
Pedro Alves