diff options
author | James E Keenan <jkeenan@cpan.org> | 2021-06-26 01:27:59 +0000 |
---|---|---|
committer | James E Keenan <jkeenan@cpan.org> | 2021-07-05 11:38:19 +0000 |
commit | f7b332245abf1aa8ca9c82cce454353f7b820adb (patch) | |
tree | 09f2711624b0c1b7022c103c2d44cc85dc202530 /scope.h | |
parent | 712b667820f97ab41da6f621f1bff8b790e158f5 (diff) | |
download | perl-f7b332245abf1aa8ca9c82cce454353f7b820adb.tar.gz |
Eliminate '-Wstring-compare' build-time warning in re_comp.c.
Per discussion with TonyC, use of the 'GCC' versions of two macros here
is appropriate because that version is documented to handle CLANG as
well. Using these macros preserves an optimization added in d0f83c3 in
2009.
PR GH 18948 for issue GH 17015.
Diffstat (limited to 'scope.h')
-rw-r--r-- | scope.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -208,9 +208,11 @@ scope has the given name. C<name> must be a literal string. STMT_START { \ DEBUG_SCOPE("LEAVE \"" name "\"") \ if (PL_scopestack_name) { \ + GCC_DIAG_IGNORE_STMT(-Wstring-compare); \ assert(((char*)PL_scopestack_name[PL_scopestack_ix-1] \ == (char*)name) \ || strEQ(PL_scopestack_name[PL_scopestack_ix-1], name)); \ + GCC_DIAG_RESTORE_STMT; \ } \ pop_scope(); \ } STMT_END |