This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
partially revert 'silence gcc -pendantic warnings'
authorDavid Mitchell <davem@iabyn.com>
Sat, 20 Jun 2015 01:56:03 +0000 (02:56 +0100)
committerDavid Mitchell <davem@iabyn.com>
Sat, 20 Jun 2015 01:56:03 +0000 (02:56 +0100)
The GCC_DIAG_IGNORE(-Wpedantic) stuff added by me to
STATIC_ASSERT_GLOBAL() by ac892e4a230de5b was causing some smoke failures.

I don't yet understand why.

perl.h

diff --git a/perl.h b/perl.h
index bc54d0b..ad94402 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -3526,10 +3526,7 @@ typedef pthread_key_t    perl_key;
    builtin in C++11.
 */
 /* IBM XL C V11 does not support _Static_assert, no matter what <assert.h> says */
-#  define STATIC_ASSERT_GLOBAL(COND) \
-    GCC_DIAG_IGNORE(-Wpedantic); \
-    static_assert(COND, #COND); \
-    GCC_DIAG_RESTORE;
+#  define STATIC_ASSERT_GLOBAL(COND) static_assert(COND, #COND)
 #else
 /* We use a bit-field instead of an array because gcc accepts
    'typedef char x[n]' where n is not a compile-time constant.