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: [rfc] Be in language c more c++ compatible


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


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