diff options
author | Richard Stallman <rms@gnu.org> | 1993-01-09 02:56:59 +0000 |
---|---|---|
committer | Richard Stallman <rms@gnu.org> | 1993-01-09 02:56:59 +0000 |
commit | 8355fc27ae6216450e374c325b6ca49adf6e2b41 (patch) | |
tree | 52a1d9d68a86d56c23de2625e7bae8cc965733c0 /gcc | |
parent | 10055ae2439dec264961a7a52131f8f1d40779af (diff) | |
download | gcc-8355fc27ae6216450e374c325b6ca49adf6e2b41.zip gcc-8355fc27ae6216450e374c325b6ca49adf6e2b41.tar.gz gcc-8355fc27ae6216450e374c325b6ca49adf6e2b41.tar.bz2 |
(yylex): Don't allow @ in identifier outside of Objective C.
From-SVN: r3163
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/c-lex.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/c-lex.c b/gcc/c-lex.c index 4c773e1..d877176 100644 --- a/gcc/c-lex.c +++ b/gcc/c-lex.c @@ -1096,11 +1096,15 @@ yylex () p = token_buffer; while (isalnum (c) || c == '_' || c == '$' || c == '@') { - if (p >= token_buffer + maxtoken) - p = extend_token_buffer (p); + /* Make sure this char really belongs in an identifier. */ + if (c == '@' && ! doing_objc_thang) + break; if (c == '$' && ! dollars_in_ident) break; + if (p >= token_buffer + maxtoken) + p = extend_token_buffer (p); + *p++ = c; c = getc (finput); } |