Bug 12563 - typename is misparsed as default constructor within a member function
Summary: typename is misparsed as default constructor within a member function
Status: RESOLVED DUPLICATE of bug 8888
Alias: None
Product: gdb
Classification: Unclassified
Component: c++ (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-10 12:35 UTC by Andre'
Modified: 2012-11-28 17:24 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andre' 2011-03-10 12:35:10 UTC
The expressions

 gdb.parse_and_eval('0xdeadbeaf').cast(gdb.lookup_type('A').pointer())

and

 gdb.parse_and_eval('(A*)0xdeadbeaf')

do not create the same result in gdb 7.2 and current CVS when used inside a member function of type A.

The first one results in a pointer-to-A with value 0xdeadbeef, the second results in a parse error (as does plain 'print (A*)0xdeadbeaf') and it looks like 'A' is mis-read as A::A() in this case.
Comment 1 Tom Tromey 2012-11-28 17:24:37 UTC
Dup.

*** This bug has been marked as a duplicate of bug 8888 ***