Commit ed03b55b by Joseph Myers Committed by Jeff Law

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
parent 683eb0e9
2000-07-23 Joseph S. Myers <jsm28@cam.ac.uk> 2000-07-23 Joseph S. Myers <jsm28@cam.ac.uk>
* c-lex.c (init_lex): Keep the "inline" keyword in C99 mode.
(yylex): Don't pedwarn for "inline" in C99 mode.
* bitmap.c (debug_bitmap_file): Cast pointers to PTR for printing * bitmap.c (debug_bitmap_file): Cast pointers to PTR for printing
with %p. with %p.
* ggc-page.c (debug_print_page_list, alloc_page, free_page, * ggc-page.c (debug_print_page_list, alloc_page, free_page,
......
...@@ -338,7 +338,8 @@ init_lex () ...@@ -338,7 +338,8 @@ init_lex ()
{ {
UNSET_RESERVED_WORD ("asm"); UNSET_RESERVED_WORD ("asm");
UNSET_RESERVED_WORD ("typeof"); UNSET_RESERVED_WORD ("typeof");
UNSET_RESERVED_WORD ("inline"); if (! flag_isoc99)
UNSET_RESERVED_WORD ("inline");
UNSET_RESERVED_WORD ("iterator"); UNSET_RESERVED_WORD ("iterator");
UNSET_RESERVED_WORD ("complex"); UNSET_RESERVED_WORD ("complex");
} }
...@@ -1402,7 +1403,7 @@ yylex () ...@@ -1402,7 +1403,7 @@ yylex ()
/* Even if we decided to recognize asm, still perhaps warn. */ /* Even if we decided to recognize asm, still perhaps warn. */
if (pedantic if (pedantic
&& (value == ASM_KEYWORD || value == TYPEOF && (value == ASM_KEYWORD || value == TYPEOF
|| ptr->rid == RID_INLINE) || (ptr->rid == RID_INLINE && ! flag_isoc99))
&& token_buffer[0] != '_') && token_buffer[0] != '_')
pedwarn ("ANSI does not permit the keyword `%s'", pedwarn ("ANSI does not permit the keyword `%s'",
token_buffer); token_buffer);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment