This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Will therefore GDB utilize C++ or not?
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: jan dot kratochvil at redhat dot com
- Cc: gdb at sourceware dot org, tromey at redhat dot com, ratmice at gmail dot com, yao at codesourcery dot com
- Date: Tue, 4 Dec 2012 15:44:16 +0100 (CET)
- Subject: Re: Will therefore GDB utilize C++ or not?
- References: <20120330161403.GA17891@host2.jankratochvil.net> <87aa2rjkb8.fsf@fleche.redhat.com> <4F8FD047.6030702@codesourcery.com> <20121204141708.GA28600@host2.jankratochvil.net>
> Date: Tue, 4 Dec 2012 15:17:08 +0100
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
>
> On Thu, 19 Apr 2012 10:43:51 +0200, Yao Qi wrote:
> [...]
> > maybe, we can start from something easy and less-controvesy,
> >
> > On 04/05/2012 04:47 AM, Tom Tromey wrote:
> > > 1. Modify GDB so it can be compiled with -Wc++-compat.
> > > This would be the first patch series. There is already an archer
> > > branch for this.
> >
> > Modify GDB as well as GDBserver/IPA so they can be compiled with
> > -Wc++-compat.
> >
> > > 2. Then, change GDB to compile with a C++ compiler (-Wc++-compat is
> > > not complete). This would be the second patch series.
> > >
> >
> > Change to use C++ compiler to compile GDB, GDBserver and IPA. If this
> > is too aggressive, we can use C++ compiler to compile GDB and keep C
> > compiler to compiler GDBserver and IPA. Sources in gdb/common/ will be
> > compiled by C compiler and C++ compiler respectively. Is it possible?
>
> For one of the justifications of C++
> http://sourceware.org/ml/gdb/2012-11/msg00070.html
> speficially to upstream the 64-bit inferior offsets/sizes as present in many
> patches posted by Siddhesh Poyarekar <siddhesh@redhat.com>:
>
> It would be enough to have GDB (neither gdbserver nor IPA) compilable as C++.
> Explicit configure option would be required. It would be used to create the
> 64-bit offsets patch and then also during nightly regression testing to catch
> possible following 64-bit offsets type violations/regressions.
>
>
> Is it enough plan to justify the -Wc++-compat compatibility step?
> That is to update and check-in archer-ratmice-compile-Wc++-compat.
Not without proper review of the changes. And since my position on
C++ has changed, I'd not really eager to do that. But if -Wc++-compat
would make you happy, and stop pushing for switching GDB to C++, I'd
be willing to spend some time to help.