Commit a8767945 by Richard Kenner

(check_newline): Fix #pragma parsing; issue error message for

directive that starts with `p' but isn't `pragma'.

From-SVN: r11928
parent 373e7d69
...@@ -403,16 +403,14 @@ check_newline () ...@@ -403,16 +403,14 @@ check_newline ()
if (c == '\n') if (c == '\n')
return c; return c;
#ifdef HANDLE_SYSV_PRAGMA #ifdef HANDLE_SYSV_PRAGMA
ungetc (c, finput);
token = yylex (); token = yylex ();
if (token != IDENTIFIER) if (token != IDENTIFIER)
goto skipline; goto skipline;
if (handle_sysv_pragma (finput, token)) return handle_sysv_pragma (finput, token);
{
c = getc (finput);
return c;
}
#else /* !HANDLE_SYSV_PRAGMA */ #else /* !HANDLE_SYSV_PRAGMA */
#ifdef HANDLE_PRAGMA #ifdef HANDLE_PRAGMA
ungetc (c, finput);
token = yylex (); token = yylex ();
if (token != IDENTIFIER) if (token != IDENTIFIER)
goto skipline; goto skipline;
...@@ -423,8 +421,8 @@ check_newline () ...@@ -423,8 +421,8 @@ check_newline ()
} }
#endif /* HANDLE_PRAGMA */ #endif /* HANDLE_PRAGMA */
#endif /* !HANDLE_SYSV_PRAGMA */ #endif /* !HANDLE_SYSV_PRAGMA */
goto skipline;
} }
goto skipline;
} }
else if (c == 'd') else if (c == 'd')
......
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