Update Pragma Macro Use

1. The wrapper for the pragma PRAGMA_GCC_DIAG_PUSH and its friends are
   not set up to be used like a function. Remove the semicolons after
   their usage. (Clang doesn't care, but MSVC does.)
pull/661/head
John Safranek 2024-03-01 16:02:30 -08:00
parent 6dd53b12ec
commit 8c28f7a3a5
No known key found for this signature in database
GPG Key ID: 8CE817DE0D3CCB4A
1 changed files with 3 additions and 3 deletions

View File

@ -120,13 +120,13 @@ char* myoptarg = NULL;
#define AssertStrLE(x, y) AssertStr(x, y, <=, >)
#define AssertPtr(x, y, op, er) do { \
PRAGMA_GCC_DIAG_PUSH; \
PRAGMA_GCC_DIAG_PUSH \
/* remarkably, without this inhibition, */ \
/* the _Pragma()s make the declarations warn. */ \
PRAGMA_GCC("GCC diagnostic ignored \"-Wdeclaration-after-statement\""); \
PRAGMA_GCC("GCC diagnostic ignored \"-Wdeclaration-after-statement\"") \
/* inhibit "ISO C forbids conversion of function pointer */ \
/* to object pointer type [-Werror=pedantic]" */ \
PRAGMA_GCC("GCC diagnostic ignored \"-Wpedantic\""); \
PRAGMA_GCC("GCC diagnostic ignored \"-Wpedantic\"") \
void* _x = (void*)(x); \
void* _y = (void*)(y); \
Assert(_x op _y, ("%s " #op " %s", #x, #y), ("%p " #er " %p", _x, _y)); \