diff options
author | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-12-10 20:08:59 +0000 |
---|---|---|
committer | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-12-10 20:08:59 +0000 |
commit | 36186417c44613cbf5cf6bcd23dae0ac8afb9e17 (patch) | |
tree | 388abb74ae9bdd4ee8004d380c37d8256154a4ec /gcc/c-lex.c | |
parent | 5de758e3c550d35e35c58fa6ca704c50faa5f62f (diff) | |
download | gcc-36186417c44613cbf5cf6bcd23dae0ac8afb9e17.tar.gz |
* c-lex.c, c-parse.in, c-typeck.c: Revert concatenation changes.
cp:
* parse.y, semantics.c: Similarly.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47848 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-lex.c')
-rw-r--r-- | gcc/c-lex.c | 51 |
1 files changed, 4 insertions, 47 deletions
diff --git a/gcc/c-lex.c b/gcc/c-lex.c index 84d64f16768..e70be7028e6 100644 --- a/gcc/c-lex.c +++ b/gcc/c-lex.c @@ -762,7 +762,6 @@ c_lex (value) tree *value; { const cpp_token *tok; - enum cpp_ttype result; retry: timevar_push (TV_CPP); @@ -777,9 +776,7 @@ c_lex (value) lineno = src_lineno; *value = NULL_TREE; - result = tok->type; - - switch (result) + switch (tok->type) { case CPP_OPEN_BRACE: indent_level++; break; case CPP_CLOSE_BRACE: indent_level--; break; @@ -807,48 +804,8 @@ c_lex (value) case CPP_STRING: case CPP_WSTRING: - { - tree full_str = NULL_TREE; - - do - { - /* Translate escape sequences in this string, then append it. */ - tree str = lex_string ((const char *) tok->val.str.text, - tok->val.str.len, - tok->type == CPP_WSTRING); - - if (full_str && c_language == clk_c && warn_traditional - && !in_system_header) - { - static int last_lineno; - static const char *last_input_filename; - - if (lineno != last_lineno || !last_input_filename - || strcmp (last_input_filename, input_filename)) - { - warning ("traditional C rejects string concatenation"); - last_lineno = lineno; - last_input_filename = input_filename; - } - } - - full_str = chainon (full_str, str); - - /* Wide and non-wide give a wide result. */ - if (tok->type == CPP_WSTRING) - result = CPP_WSTRING; - - /* Look ahead for another string token. */ - do - tok = cpp_get_token (parse_in); - while (tok->type == CPP_PADDING); - } - while (tok->type == CPP_STRING || tok->type == CPP_WSTRING); - - _cpp_backup_tokens (parse_in, 1); - - *value = combine_strings (full_str); - } + *value = lex_string ((const char *)tok->val.str.text, + tok->val.str.len, tok->type == CPP_WSTRING); break; /* These tokens should not be visible outside cpplib. */ @@ -860,7 +817,7 @@ c_lex (value) default: break; } - return result; + return tok->type; } #define ERROR(msgid) do { error(msgid); goto syntax_error; } while(0) |