Re: Will therefore GDB utilize C++ or not?

Mark Kettenis
2012-12-04T14:44:44Z

> 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.