This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patchv2] PR c++/14177 - Fix parsing TYPENAME:: in parentheses
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 8 Jun 2012 18:26:23 +0200
- Subject: Re: [patchv2] PR c++/14177 - Fix parsing TYPENAME:: in parentheses
- References: <20120530223043.GA9608@host2.jankratochvil.net> <20120531013751.GA19513@host2.jankratochvil.net> <87hauleq83.fsf@fleche.redhat.com>
On Fri, 08 Jun 2012 18:13:48 +0200, Tom Tromey wrote:
> That is, does this need to be valid?
>
> Jan> +gdb_test "p CV_f(CV::t)" { = {int \(int\)} 0x[0-9a-f]+ <CV_f\(int\)>}
Yes, I think it should be valid. But it already does not work anyway with FSF
GDB HEAD as I tried now:
2 void f () {v++;}
3 void f(int x){v++;}
(gdb) p f(int)
$2 = {void (void)} 0x4005ac <f()>
(gdb) p 'f(int)'
$3 = {void (int)} 0x4005c1 <f(int)>
Moreover there is the ambiguity:
(gdb) p f()
$4 = void
which one needs to workaround by one of:
(gdb) p 'f()'
$5 = {void (void)} 0x4005ac <f()>
(gdb) p f(void)
$7 = {void (void)} 0x4005ac <f()>
> Jan> +int arglist_typeinstance;
>
> I think it would be preferable to make this local to c-exp.y and just
> clear it at the few spots that start_arglist is called.
>
> Otherwise it all seems ok to me.
I do not like it much, I believe bison should be able do derive the
expressions properly on its own. Just so far I failed to fix it that way.
I still plan to try it once again.
Thanks,
Jan