[Bug debug/55641] New: debug info for the type of a reference declared with a typedef has spurious 'const'

dblaikie at gmail dot com gcc-bugzilla@gcc.gnu.org
Mon Dec 10 16:29:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55641

             Bug #: 55641
           Summary: debug info for the type of a reference declared with a
                    typedef has spurious 'const'
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dblaikie@gmail.com


Example code:

  typedef int &foo;
  int x;
  foo f(x);

under gdb run "whatis f" and the answer is "const foo" when it should be plain
"foo" (if you skip the typedef the answer is correctly "int&" not "int& const"
or any similarly strange mismatch)

Found in the GDB 7.5 test suite ( gdb.python/lib-types.exp ) - this is
positively tested for, but so far as I can imagine that's by accident, not
intent.



More information about the Gcc-bugs mailing list