#pragma parsing
Martin von Loewis
loewis@informatik.hu-berlin.de
Tue Oct 27 04:40:00 GMT 1998
When parsing
#pragma ident "Hello, world"
a string is accessed as an identifier. This patch fixes that.
Alternatively, token_buffer could be used to get the string
representing the current token.
Regards,
Martin
1998-10-27 Martin von Löwis <loewis@informatik.hu-berlin.de>
* lex.c (handle_generic_pragma): Retrieve string value for string
and integer constants.
Index: lex.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/lex.c,v
retrieving revision 1.81
diff -c -p -r1.81 lex.c
*** lex.c 1998/10/23 14:53:08 1.81
--- lex.c 1998/10/27 12:17:32
*************** handle_generic_pragma (token)
*** 4976,4985 ****
{
case IDENTIFIER:
case TYPENAME:
- case STRING:
- case CONSTANT:
handle_pragma_token (IDENTIFIER_POINTER(yylval.ttype), yylval.ttype);
break;
case '(':
handle_pragma_token ("(", NULL_TREE);
break;
--- 4976,4990 ----
{
case IDENTIFIER:
case TYPENAME:
handle_pragma_token (IDENTIFIER_POINTER(yylval.ttype), yylval.ttype);
break;
+ case STRING:
+ handle_pragma_token (TREE_STRING_POINTER (yylval.ttype),
+ yylval.ttype);
+ break;
+ case CONSTANT:
+ handle_pragma_token ("<number>", yylval.ttype);
+ break;
case '(':
handle_pragma_token ("(", NULL_TREE);
break;
More information about the Gcc-patches
mailing list