diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2014-06-18 15:36:17 -0400 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2014-06-18 17:42:36 -0400 |
commit | a3ccabcaeadf665f84ad52c7504a4a2e78ed5c8f (patch) | |
tree | 50d66db17970b697a3586d1be8092f6bc3e6ef25 | |
parent | 9bfc1d15e1a9304ab5c1171ac7e258687c650bab (diff) | |
download | perl-a3ccabcaeadf665f84ad52c7504a4a2e78ed5c8f.tar.gz |
GCC_DIAG_IGNORE needs to end with semicolon (inline.h).
Furthermore, make the GCC_DIAG_IGNORE and _RESTORE to be dNOOPs,
so that they can be at any level of the code, including global, even
when the compiler is not gcc (or lookalike). If they are just empty,
";" will be left at the call site.
-rw-r--r-- | inline.h | 2 | ||||
-rw-r--r-- | perl.h | 5 |
2 files changed, 3 insertions, 4 deletions
@@ -188,7 +188,7 @@ S_sv_or_pv_pos_u2b(pTHX_ SV *sv, const char *pv, STRLEN pos, STRLEN *lenp) /* ------------------------------- handy.h ------------------------------- */ /* saves machine code for a common noreturn idiom typically used in Newx*() */ -GCC_DIAG_IGNORE(-Wunused-function) +GCC_DIAG_IGNORE(-Wunused-function); static void S_croak_memory_wrap(void) { @@ -394,11 +394,10 @@ GCC_DIAG_DO_PRAGMA_(GCC diagnostic ignored #x) # define GCC_DIAG_RESTORE _Pragma("GCC diagnostic pop") #else -# define GCC_DIAG_IGNORE(w) -# define GCC_DIAG_RESTORE +# define GCC_DIAG_IGNORE(w) dNOOP +# define GCC_DIAG_RESTORE dNOOP #endif - #define NOOP /*EMPTY*/(void)0 /* cea2e8a9dd23747f accidentally lost the comment originally from the first check in of thread.h, explaining why we need dNOOP at all: */ |