This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldiag: A deprecation is now fatal
[perl5.git] / sbox32_hash.h
index 4413342..766102f 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef DEBUG_SBOX32_HASH
 #define DEBUG_SBOX32_HASH 0
 
-GCC_DIAG_IGNORE(-Wimplicit-fallthrough)
-
 #include "zaphod32_hash.h"
 
 #if DEBUG_SBOX32_HASH == 1
@@ -31,16 +29,16 @@ GCC_DIAG_IGNORE(-Wimplicit-fallthrough)
 
 #ifndef PERL_SEEN_HV_FUNC_H
 #if !defined(U32) 
-    #include <stdint.h>
-    #define U32 uint32_t
+#include <stdint.h>
+#define U32 uint32_t
 #endif
 
 #if !defined(U8)
-    #define U8 unsigned char
+#define U8 unsigned char
 #endif
 
 #if !defined(U16)
-    #define U16 uint16_t
+#define U16 uint16_t
 #endif
 
 #ifndef STRLEN
@@ -64,13 +62,13 @@ GCC_DIAG_IGNORE(-Wimplicit-fallthrough)
 /* Find best way to ROTL32/ROTL64 */
 #ifndef ROTL32
 #if defined(_MSC_VER)
-  #include <stdlib.h>  /* Microsoft put _rotl declaration in here */
-  #define ROTL32(x,r)  _rotl(x,r)
-  #define ROTR32(x,r)  _rotr(x,r)
+#include <stdlib.h>  /* Microsoft put _rotl declaration in here */
+#define ROTL32(x,r)  _rotl(x,r)
+#define ROTR32(x,r)  _rotr(x,r)
 #else
-  /* gcc recognises this code and generates a rotate instruction for CPUs with one */
-  #define ROTL32(x,r)  (((U32)(x) << (r)) | ((U32)(x) >> (32 - (r))))
-  #define ROTR32(x,r)  (((U32)(x) << (32 - (r))) | ((U32)(x) >> (r)))
+/* gcc recognises this code and generates a rotate instruction for CPUs with one */
+#define ROTL32(x,r)  (((U32)(x) << (r)) | ((U32)(x) >> (32 - (r))))
+#define ROTR32(x,r)  (((U32)(x) << (32 - (r))) | ((U32)(x) >> (r)))
 #endif
 #endif
 
@@ -1422,6 +1420,7 @@ GCC_DIAG_IGNORE(-Wimplicit-fallthrough)
 #endif
 
 #define _SBOX32_CASE(len,hash,state,key) \
+    /* FALLTHROUGH */ \
     case len: hash ^= state[ 1 + ( 256 * ( len - 1 ) ) + key[ len - 1 ] ];
 
 
@@ -1781,6 +1780,4 @@ SBOX32_STATIC_INLINE U32 sbox32_hash128(
     return sbox32_hash_with_state((U8*)state,key,key_len);
 }
 
-GCC_DIAG_RESTORE
-
 #endif