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: [patchv2] PR c++/14177 - Fix parsing TYPENAME:: in parentheses


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


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