diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2014-06-20 09:04:34 -0400 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2014-06-21 21:08:23 -0400 |
commit | 6ab56f1e9333e6777f0fd1d37c91574aa3a5af02 (patch) | |
tree | 78c94648b5a72f9f3df706a104e59586e52a2495 | |
parent | a7b0b63ac23b24666cd605e01393e7f8d45d02ab (diff) | |
download | perl-6ab56f1e9333e6777f0fd1d37c91574aa3a5af02.tar.gz |
Try simpler usage for file-level GCC_DIAG_RESTORE.
-rw-r--r-- | inline.h | 4 | ||||
-rw-r--r-- | perl.h | 8 |
2 files changed, 4 insertions, 8 deletions
@@ -189,7 +189,7 @@ S_sv_or_pv_pos_u2b(pTHX_ SV *sv, const char *pv, STRLEN pos, STRLEN *lenp) /* saves machine code for a common noreturn idiom typically used in Newx*() */ #ifdef GCC_DIAG_PRAGMA -GCC_DIAG_IGNORE(-Wunused-function); +GCC_DIAG_IGNORE(-Wunused-function) /* Intentionally left semicolonless. */ #endif static void S_croak_memory_wrap(void) @@ -197,7 +197,7 @@ S_croak_memory_wrap(void) Perl_croak_nocontext("%s",PL_memory_wrap); } #ifdef GCC_DIAG_PRAGMA -GCC_DIAG_RESTORE; +GCC_DIAG_RESTORE /* Intentionally left semicolonless. */ #endif /* ------------------------------- utf8.h ------------------------------- */ @@ -391,12 +391,8 @@ * semicolon being left alone on a line: * ; * which makes compilers mildly cranky. Therefore at file level one - * should use the #ifdef GCC_DIAG_PRAGMA guard around the GCC_DIAG_IGNORE - * and GCC_DIAG_RESTORE. - * - * (An alternative solution would be not to use the semicolon, and then - * the empty definition would be just empty, but that would make the code - * look odd, and might mess up e.g. smart editors indenting the code.) + * should use the GCC_DIAG_IGNORE and GCC_DIAG_RESTORE_FILE *without* + * the semicolons. * * (A dead-on-arrival solution would be to try to define the macros as * NOOP or dNOOP, those don't work both inside functions and outside.) |