From f7b332245abf1aa8ca9c82cce454353f7b820adb Mon Sep 17 00:00:00 2001 From: James E Keenan Date: Sat, 26 Jun 2021 01:27:59 +0000 Subject: 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. --- scope.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scope.h') diff --git a/scope.h b/scope.h index 49177e32a8..ba74c8bff5 100644 --- a/scope.h +++ b/scope.h @@ -208,9 +208,11 @@ scope has the given name. C 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 -- cgit v1.2.1