*** empty log message ***
authorRichard Stallman <rms@gnu.org>
Tue, 2 Jun 1992 21:09:25 +0000 (21:09 +0000)
committerRichard Stallman <rms@gnu.org>
Tue, 2 Jun 1992 21:09:25 +0000 (21:09 +0000)
From-SVN: r1140

gcc/cccp.c

index f0ce06ffacb31e6105a84b6e52e0149622ec4364..0dbf5f866f48057b3e31a5e2e4463aacffda1b68 100644 (file)
@@ -5838,7 +5838,10 @@ do_pragma (buf, limit)
   while (*buf == ' ' || *buf == '\t')
     buf++;
   if (!strncmp (buf, "once", 4)) {
-    warning ("`#pragma once' is obsolete");
+    /* Allow #pragma once in system headers, since that's not the user's
+       fault.  */
+    if (!instack[indepth].system_header_p)
+      warning ("`#pragma once' is obsolete");
     do_once ();
   }
   return 0;