Skip to content

Commit

Permalink
Eliminate '-Wstring-compare' build-time warning in re_comp.c.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jkeenan committed Jul 5, 2021
1 parent 712b667 commit f7b3322
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scope.h
Expand Up @@ -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
Expand Down

0 comments on commit f7b3322

Please sign in to comment.