From 5f3563911b9fd00ff487932f3476fc6b56d6a002 Mon Sep 17 00:00:00 2001 From: Tony Cook Date: Tue, 3 Aug 2021 16:39:45 +1000 Subject: use CLANG_DIAG_IGNORE_STMT instead of GCC_DIAG_IGNORE_STMT It turns out gcc wasn't warning on this code, but older gcc (as included in debian buster) *does* warn on the switch which it doesn't recognise. Newer gcc does recognise the -Wstring-compare switch, but it controls warning on a different construct, so there's no reason to present it to gcc. --- scope.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scope.h b/scope.h index ba74c8bff5..f38e7edb55 100644 --- a/scope.h +++ b/scope.h @@ -208,11 +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); \ + CLANG_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; \ + CLANG_DIAG_RESTORE_STMT; \ } \ pop_scope(); \ } STMT_END -- cgit v1.2.1