aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-lex.c
diff options
context:
space:
mode:
authorJoseph Myers <jsm28@cam.ac.uk>2000-07-23 10:28:30 -0600
committerJeff Law <law@gcc.gnu.org>2000-07-23 10:28:30 -0600
commited03b55bb0841bd2a7e1ea5138bbe5c8fdcf4955 (patch)
treeee275a09ddc4a4c9076ebf8deb8c7fc73bd556fa /gcc/c-lex.c
parent683eb0e99a52c56e400f690a62236cf66ab4d981 (diff)
downloadgcc-ed03b55bb0841bd2a7e1ea5138bbe5c8fdcf4955.zip
gcc-ed03b55bb0841bd2a7e1ea5138bbe5c8fdcf4955.tar.gz
gcc-ed03b55bb0841bd2a7e1ea5138bbe5c8fdcf4955.tar.bz2
c-lex.c (init_lex): Keep the "inline" keyword in C99 mode.
* c-lex.c (init_lex): Keep the "inline" keyword in C99 mode. (yylex): Don't pedwarn for "inline" in C99 mode. From-SVN: r35202
Diffstat (limited to 'gcc/c-lex.c')
-rw-r--r--gcc/c-lex.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/c-lex.c b/gcc/c-lex.c
index fe1d03f..9ceb2bf 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);