+ /* Closing paren expected */
+ SB_SkipWhite (&B);
+ if (SB_Get (&B) != ')') {
+ Error ("')' expected");
+ return;
+ }
+ SB_SkipWhite (&B);
+
+ /* Allow an optional semicolon to be compatible with the old syntax */
+ if (SB_Peek (&B) == ';') {
+ SB_Skip (&B);
+ SB_SkipWhite (&B);
+ }
+
+ /* Make sure nothing follows */
+ if (SB_Peek (&B) != '\0') {
+ Error ("Unexpected input following pragma directive");
+ }
+
+ /* Release the StrBuf */
+ DoneStrBuf (&B);
+}
+
+
+
+void DoPragma (void)
+/* Handle pragmas. These come always in form of the new C99 _Pragma() operator. */
+{
+ /* Skip the token itself */
+ NextToken ();
+
+ /* We expect an opening paren */
+ if (!ConsumeLParen ()) {
+ return;
+ }
+
+ /* String literal */
+ if (CurTok.Tok != TOK_SCONST) {
+
+ /* Print a diagnostic */
+ Error ("String literal expected");
+
+ /* Try some smart error recovery: Skip tokens until we reach the
+ * enclosing paren, or a semicolon.
+ */
+ PragmaErrorSkip ();
+
+ } else {
+
+ /* Parse the _Pragma statement */
+ ParsePragma ();
+ }
+