* cpplib.c (do_pragma): Accept #pragma without consecutive token.
authorAlexandre Oliva <oliva@lsd.ic.unicamp.br>
Sun, 27 Feb 2000 06:24:27 +0000 (06:24 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Sun, 27 Feb 2000 06:24:27 +0000 (06:24 +0000)
From-SVN: r32211

gcc/ChangeLog
gcc/cpplib.c

index 35af536..f11c447 100644 (file)
@@ -1,3 +1,7 @@
+2000-02-27  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
+
+       * cpplib.c (do_pragma): Accept #pragma without consecutive token.
+
 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
 
        * integrate.c (copy_decl_for_inlining): Preserve TREE_ADDRESSABLE
index dff43ca..8c7c2ea 100644 (file)
@@ -1615,14 +1615,21 @@ do_pragma (pfile, keyword)
   long here, key;
   U_CHAR *buf;
   int pop;
+  enum cpp_token token;
 
   here = CPP_WRITTEN (pfile);
   CPP_PUTS (pfile, "#pragma ", 8);
 
   key = CPP_WRITTEN (pfile);
   pfile->no_macro_expand++;
-  if (get_directive_token (pfile) != CPP_NAME)
-    goto skip;
+  token = get_directive_token (pfile);
+  if (token != CPP_NAME)
+    {
+      if (token == CPP_VSPACE)
+       goto empty;
+      else
+       goto skip;
+    }
 
   buf = pfile->token_buffer + key;
   CPP_PUTC (pfile, ' ');
@@ -1649,6 +1656,7 @@ do_pragma (pfile, keyword)
  skip:
   cpp_error (pfile, "malformed #pragma directive");
   skip_rest_of_line (pfile);
+ empty:
   CPP_SET_WRITTEN (pfile, here);
   pfile->no_macro_expand--;
   return 0;