From e1110d6c58c2ebe40be0b011aee14d4e60748e3d Mon Sep 17 00:00:00 2001 From: Dery Almas Date: Sat, 15 Nov 2025 21:38:08 +0100 Subject: [PATCH] Fix error suppression macro My previous fix triggered another issue: apparently at least GCC expects the `_Pragma` operator to be placed in its own statement (after a semicolon). The current macro simply dumped the expression and the _Pragma together, triggering an error. Putting a semicolon after `Expr` fixes the issue (actually double-checked after a `git clean -fdx`), although slightly changing the API (the semicolon after the wrapped macros is now optional). --- public/tracy/Tracy.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/tracy/Tracy.hpp b/public/tracy/Tracy.hpp index bd185fed..84813969 100644 --- a/public/tracy/Tracy.hpp +++ b/public/tracy/Tracy.hpp @@ -155,19 +155,19 @@ #define SuppressVarShadowWarning(Expr) \ _Pragma("clang diagnostic push") \ _Pragma("clang diagnostic ignored \"-Wshadow\"") \ - Expr \ + Expr; \ _Pragma("clang diagnostic pop") #elif defined(__GNUC__) #define SuppressVarShadowWarning(Expr) \ _Pragma("GCC diagnostic push") \ _Pragma("GCC diagnostic ignored \"-Wshadow\"") \ - Expr \ + Expr; \ _Pragma("GCC diagnostic pop") #elif defined(_MSC_VER) #define SuppressVarShadowWarning(Expr) \ _Pragma("warning(push)") \ _Pragma("warning(disable : 4456)") \ - Expr \ + Expr; \ _Pragma("warning(pop)") #else #define SuppressVarShadowWarning(Expr) Expr