This is the mail archive of the gdb-patches@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: [PATCH] xtensa: Avoid designated inits, for C++ compliance


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


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