From 8355fc27ae6216450e374c325b6ca49adf6e2b41 Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Sat, 9 Jan 1993 02:56:59 +0000 Subject: [PATCH] (yylex): Don't allow @ in identifier outside of Objective C. From-SVN: r3163 --- gcc/c-lex.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gcc/c-lex.c b/gcc/c-lex.c index 4c773e118d8..d8771762d9d 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); }