Allow C99/C11 in bfd?

Christian Biesinger via gdb
Fri Jan 24 16:34:00 GMT 2020

On Fri, Jan 24, 2020 at 2:20 PM Joel Brobecker <> wrote:
> > > (I'm not even going to ask about C++, although I think that would be nice)
> >
> > Bah!  Real programmers don't use C++!  Just joking of course,
> > but I seriously doubt that we will want to change the code base
> > now.  Speaking personally I am much more comfortable with C
> > than with C++, but that is probably just me.
> The way the Pro C++ members of the GDB community approached the
> suggestion was by building a case of what C++ would bring,
> concretely, in terms of improvement. They also had a transition
> plan. As someone who was _not_ in favor of the switch to C++, I had
> to admit that the C++ proponents had some solid points and that
> those against did not have a solid counter-argument. It took
> a while, as a decision of this magnitude always takes, but
> it helped us keep the discussions focused on factual technical
> arguments. I thought that worked really way for the GDB group.
> Assuming the community is not refusing to even hear about the idea,
> how things happened in GDB could be inspiration for how to at least
> debate the merits of the change.

OK. I'm definitely not ready right now to make a full case for
switching to C++. Advantages, of course, include easier memory
handling with smart pointers and easier string handling with

> Note that the idea might be dead right off the bat if being
> usable from C is an objective of the binutils project. For
> a relatively low-level library like this one, I wouldn't personally
> be surprised.

Well, you could still use extern "C" for any entry points and still
get a lot of advantages.

Anyway, OK, since initial opinions on C99 sound promising I guess I'll
send a patch to enable the C99 flag and see if anyone else has
opinions. It does not look like autoconf has an easy way to enable


More information about the Gdb mailing list