summaryrefslogtreecommitdiffstats
path: root/gcc/c-lex.c
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2000-08-04 01:30:06 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2000-08-04 01:30:06 +0000
commit71aa9da49a647f40be52849e809d9264b1601629 (patch)
tree254d84e8b966d54bb05be43ebe0b47a16be7a4ea /gcc/c-lex.c
parentc5be76eb6c3b9771c9b305553c7c0f9e0a85de86 (diff)
downloadppe42-gcc-71aa9da49a647f40be52849e809d9264b1601629.tar.gz
ppe42-gcc-71aa9da49a647f40be52849e809d9264b1601629.zip
* cpplex.c (parse_name): Might have to glue a CPP_OTHER token
before the name. (lex_line): Glue @ onto the beginning of identifiers and string constants, in Objective-C mode. (output_token, spell_token): Handle CPP_OSTRING. (can_paste, maybe_paste_with_next): Handle pasting @ onto the beginning of a NAME or a STRING, in objc mode. * cpplib.c (get_define_node): Do not permit identifiers that begin with @ to be #defined. * cppmacro.c (CAN_PASTE_AFTER): Add CPP_OTHER. * cpplib.h (TTYPE_TABLE): Add CPP_OSTRING. * c-lang.c, objc/objc-act.c (build_objc_string): Delete. * c-tree.h (build_objc_string): Delete prototype. * objc/objc-tree.def: Delete OBJC_STRING_CST. * c-lex.c (yylex): Use build_string for all three kinds of strings. * gcc.dg/cpp/20000625-2.c: Don't expect a warning on line 4. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35470 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-lex.c')
-rw-r--r--gcc/c-lex.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/gcc/c-lex.c b/gcc/c-lex.c
index 9ceb2bfcc62..616ecbe2080 100644
--- a/gcc/c-lex.c
+++ b/gcc/c-lex.c
@@ -2268,25 +2268,19 @@ yylex ()
/* We have read the entire constant.
Construct a STRING_CST for the result. */
+ yylval.ttype = build_string (p - (token_buffer + 1), token_buffer + 1);
if (wide_flag)
{
- yylval.ttype = build_string (p - (token_buffer + 1),
- token_buffer + 1);
TREE_TYPE (yylval.ttype) = wchar_array_type_node;
value = STRING;
}
else if (objc_flag)
{
- /* Return an Objective-C @"..." constant string object. */
- yylval.ttype = build_objc_string (p - (token_buffer + 1),
- token_buffer + 1);
TREE_TYPE (yylval.ttype) = char_array_type_node;
value = OBJC_STRING;
}
else
{
- yylval.ttype = build_string (p - (token_buffer + 1),
- token_buffer + 1);
TREE_TYPE (yylval.ttype) = char_array_type_node;
value = STRING;
}
OpenPOWER on IntegriCloud