This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] xtensa: Avoid designated inits, for C++ compliance
- From: Pedro Alves <palves at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>, Andreas Arnez <arnez at linux dot vnet dot ibm dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 26 Aug 2016 10:39:27 +0100
- Subject: Re: [PATCH] xtensa: Avoid designated inits, for C++ compliance
- Authentication-results: sourceware.org; auth=none
- References: <m34m69giza.fsf@oc1027705133.ibm.com> <20160826090148.GA27461@host1.jankratochvil.net>
On 08/26/2016 10:01 AM, Jan Kratochvil wrote:
> On Thu, 25 Aug 2016 13:56:25 +0200, Andreas Arnez wrote:
>> C++ does not officially support designators in initializer lists.
>
> I could miss something about the transition to C++ (...)
You're missing that we haven't dropped support for building with
a C compiler yet...
We're still doing many 7.12 backports, so I was waiting for that
to stabilize before proposing to drop C support.
> The checked in change
> makes the source apparently more error prone to future changes. Why not the
> attached?
Note that this header is meant to be replaced as part of an "overlay".
See:
http://wiki.linux-xtensa.org/index.php/Toolchain_Overlay_File
https://www.sourceware.org/ml/gdb-patches/2015-04/msg00695.html
> I have noticed now the C++ conversion does not seem to be complete to me
> - struct gdbarch_tdep is defined differently for different translation units,
> this violates:
> https://en.wikipedia.org/wiki/One_Definition_Rule
Right, we're not LTO-ready yet. Note -Wodr (w/ -flto) helps find these.
Thanks,
Pedro Alves