This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc] Be in language c more c++ compatible
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: jan dot kratochvil at redhat dot com
- Cc: gdb-patches at sourceware dot org
- Date: Sat, 23 Jul 2011 20:38:11 +0200 (CEST)
- Subject: Re: [rfc] Be in language c more c++ compatible
- References: <20110715191920.GA29975@host1.jankratochvil.net>
> Date: Fri, 15 Jul 2011 21:19:20 +0200
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
>
> Hi,
>
> I always see some terrible C++ GDB bug so I fix in some hours and then find out
> it works in GDB when one has `set language c++'. This usually happens with
> artificial testcases like the one today:
> http://sourceware.org/ml/gdb-patches/2011-07/msg00387.html
>
> I was told by Keith it also happens to him.
>
> echo 'class C { typedef int t; t i; } c;'|g++ -c -o 1.o -g -x c++ -
Isn't that a GCC bug? I mean, if code is compiled with the C++
compiler it should be tagged as such in the debug info shouldn't it?
> The first (c-exp.y) part parses those parts of `language c++' which cannot
> (I believe - RFC) lead to misinterpretation of any valid C code even in
> `language c'.
I think this is a bad idea.