[Bug c++/11437] ICE in lookup_name_real
PLEASE REPLY TO firstname.lastname@example.org ONLY, *NOT* email@example.com.
------- Additional Comments From neroden at gcc dot gnu dot org 2003-07-09 03:54 -------
The bug will also show up with __imag and __real.
If I replace __imag__ with something like int, the backtrace when the error occurs
is the same from the top down to this point:
#29 0x080fdedd in cp_parser_expression_statement (parser=0x401ab4c0)
#30 0x080fdc6a in cp_parser_statement (parser=0x401ab4c0)
In the case where it gets to the correct error message, it instead goes:
#7 0x080f90e9 in cp_parser_declaration_statement (parser=0x40133144)
#8 0x080f8760 in cp_parser_statement (parser=0x4018a4c0)
In other words, it fails to parse it as a declaration statement, and tries to parse it as an expression statement.
Which seems quite wrong to me. For some cryptic reason, it doesn't recognize it as a type name.
The actual ICE is caused by something else:
#2 0x0806d002 in lookup_function_nonclass (name=0x0, args=0xe)
#3 0x080531ca in build_new_op (code=132, flags=3, arg1=0x401ad804, arg2=0x0,
arg3=0x0) at ../../gcc-3.4-CVS/gcc/cp/call.c:3712
Clearly we shouldn't be looking up a NULL name under any circumstances. How this happens is beyond me.
------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.