aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1996-05-05 21:59:45 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1996-05-05 21:59:45 -0400
commita8767945fe349153f366a7d3b8926865e2fd9aec (patch)
treeb848541d658d352c98c1859fcf7bee6e67e283dd /gcc
parent373e7d695e06fbd500c63493eef483a0e406f82c (diff)
downloadgcc-a8767945fe349153f366a7d3b8926865e2fd9aec.zip
gcc-a8767945fe349153f366a7d3b8926865e2fd9aec.tar.gz
gcc-a8767945fe349153f366a7d3b8926865e2fd9aec.tar.bz2
(check_newline): Fix #pragma parsing; issue error message for
directive that starts with `p' but isn't `pragma'. From-SVN: r11928
Diffstat (limited to 'gcc')
-rw-r--r--gcc/c-lex.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/gcc/c-lex.c b/gcc/c-lex.c
index 1ce34ce..966d5ef 100644
--- a/gcc/c-lex.c
+++ b/gcc/c-lex.c
@@ -403,16 +403,14 @@ check_newline ()
if (c == '\n')
return c;
#ifdef HANDLE_SYSV_PRAGMA
+ ungetc (c, finput);
token = yylex ();
if (token != IDENTIFIER)
goto skipline;
- if (handle_sysv_pragma (finput, token))
- {
- c = getc (finput);
- return c;
- }
+ return handle_sysv_pragma (finput, token);
#else /* !HANDLE_SYSV_PRAGMA */
#ifdef HANDLE_PRAGMA
+ ungetc (c, finput);
token = yylex ();
if (token != IDENTIFIER)
goto skipline;
@@ -423,8 +421,8 @@ check_newline ()
}
#endif /* HANDLE_PRAGMA */
#endif /* !HANDLE_SYSV_PRAGMA */
+ goto skipline;
}
- goto skipline;
}
else if (c == 'd')