This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug c++/13438] [3.4 Regression] internal compiler error: tree check: expected identifier_node, have integer_cst in c_parse_error at c-common.c:5921


------- Additional Comments From steven at gcc dot gnu dot org  2003-12-20 14:27 -------
We call c_parse_error with a wrong "token->value" tree: 
 
1769      /* Output the MESSAGE -- unless we're parsing tentatively.  */ 
1770      if (!cp_parser_simulate_error (parser)) 
1771        { 
1772          cp_token *token; 
1773          token = cp_lexer_peek_token (parser->lexer); 
1774          c_parse_error (message, 
1775                         /* Because c_parser_error does not understand 
1776                            CPP_KEYWORD, keywords are treated like 
1777                            identifiers.  */ 
1778                         (token->type == CPP_KEYWORD ? CPP_NAME : 
token->type), 
1779                         token->value); 
1780        } 
(gdb) step 
c_parse_error (msgid=0x8392760 "expected nested-name-specifier", 
token=CPP_NAME, value=0x4001e35c) 
    at ../../mainline/gcc/c-common.c:5904 
5904      if (token == CPP_EOF) 
(...) 
5921        error ("%s before \"%s\"", string, IDENTIFIER_POINTER (value)); 
(gdb) p debug_tree (value) 
 <integer_cst 0x4001e35c type <integer_cst 0x4001e35c 1> constant 1> 
$19 = void 
 
So even though (token->type == CPP_KEYWORD), token->value is an integer 
constant tree... 

-- 


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


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