From aa622474f8690a7cbb6b15bcda08e744a0893d1d Mon Sep 17 00:00:00 2001 From: law Date: Sun, 23 Jul 2000 16:28:30 +0000 Subject: * c-lex.c (init_lex): Keep the "inline" keyword in C99 mode. (yylex): Don't pedwarn for "inline" in C99 mode. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35202 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/c-lex.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gcc/c-lex.c') diff --git a/gcc/c-lex.c b/gcc/c-lex.c index fe1d03f4420..9ceb2bfcc62 100644 --- a/gcc/c-lex.c +++ b/gcc/c-lex.c @@ -338,7 +338,8 @@ init_lex () { UNSET_RESERVED_WORD ("asm"); UNSET_RESERVED_WORD ("typeof"); - UNSET_RESERVED_WORD ("inline"); + if (! flag_isoc99) + UNSET_RESERVED_WORD ("inline"); UNSET_RESERVED_WORD ("iterator"); UNSET_RESERVED_WORD ("complex"); } @@ -1402,7 +1403,7 @@ yylex () /* Even if we decided to recognize asm, still perhaps warn. */ if (pedantic && (value == ASM_KEYWORD || value == TYPEOF - || ptr->rid == RID_INLINE) + || (ptr->rid == RID_INLINE && ! flag_isoc99)) && token_buffer[0] != '_') pedwarn ("ANSI does not permit the keyword `%s'", token_buffer); -- cgit v1.2.1