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]

[0/5] FYI: fix typename parsing bugs


This series fixes the typename parsing regressions I introduced, and
also the other typename bugs I tripped across:

    (gdb) whatis int *(*)()
    type = int (**)()

... my regression

    (gdb) whatis int (*)(double)
    type = int (*)()

Argument types dropped.

    (gdb) whatis char (*(*)())[23]
    type = char (**)())[23]

Bad parse.

    (gdb) whatis int(*)(const int *, ...)
    A syntax error in expression, near `...)'.

Doesn't understand varargs.

    (gdb) whatis const int * (*)(const int *)
    type = const int ()

"*" mysteriously dropped.


There is still one more bug remaining that I know of, but I didn't think
it was important enough to bother with right now:

    (gdb) whatis int & &
    type = int &&

A reference to a reference doesn't make sense.
Maybe I'll fix this later; it wasn't immediately clear to me exactly
where this ought to error out.

Tom


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