diff gcc/testsuite/gcc.dg/pragma-diag-7.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line diff
--- a/gcc/testsuite/gcc.dg/pragma-diag-7.c	Fri Oct 27 22:46:09 2017 +0900
+++ b/gcc/testsuite/gcc.dg/pragma-diag-7.c	Thu Oct 25 07:37:49 2018 +0900
@@ -7,3 +7,16 @@
 /* Note the extra space before the pragma on this next line: */
  #pragma GCC diagnostic pop
 unsigned long ok_again = 2UL; /* { dg-bogus "suffix" } */
+
+/* Redundant with the previous pop, but just shows that it fails to stop the
+ * following warning with an unpatched GCC: */
+#pragma GCC diagnostic ignored "-Wtraditional"
+
+/* { dg-bogus "would be stringified" "" { target *-*-* } .+1 } */
+#define UNW_DEC_PROLOGUE(fmt, body, rlen, arg) \
+  do {									\
+      unw_rlen = rlen;							\
+      *(int *)arg = body;						\
+      printf("    %s:%s(rlen=%lu)\n",					\
+             fmt, (body ? "body" : "prologue"), (unsigned long)rlen);	\
+  } while (0)