(handle_pragma): Only print warning once.
authorDoug Evans <dje@gnu.org>
Tue, 13 Dec 1994 23:40:41 +0000 (23:40 +0000)
committerDoug Evans <dje@gnu.org>
Tue, 13 Dec 1994 23:40:41 +0000 (23:40 +0000)
From-SVN: r8652

gcc/config/h8300/h8300.c

index 8208b2aad8f8b81308b5291b3e9ccda2709b85c1..6627b10fabfc511101c1591155e1df4fe8fc65ca 100644 (file)
@@ -579,7 +579,12 @@ handle_pragma (file)
   /* ??? This is deprecated.  Delete for gcc 2.8.  */
   if (strcmp (pbuf, "section") == 0)
     {
-      warning ("#pragma section is deprecated, use section attributes");
+      static int printed_p = 0;
+      if (!printed_p)
+       {
+         warning ("#pragma section is deprecated, use section attributes");
+         printed_p = 1;
+       }
       while (c && !isalpha (c))
        c = getc (file);
       psize = 0;