From: Olivier Dion Date: Thu, 24 Oct 2024 20:18:35 +0000 (-0400) Subject: Change SIDE_ACCEPT_COMMA() to SIDE_EXPECT_SEMICOLLON() X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=33da65f2a2d7e428b35db66507615d33543b5439;p=libside.git Change SIDE_ACCEPT_COMMA() to SIDE_EXPECT_SEMICOLLON() Change-Id: I8762f6aca32418cc200bfa4f5a04b6159781fb5b Signed-off-by: Olivier Dion Signed-off-by: Mathieu Desnoyers --- diff --git a/include/side/instrumentation-c-api.h b/include/side/instrumentation-c-api.h index 8c16a44..037335b 100644 --- a/include/side/instrumentation-c-api.h +++ b/include/side/instrumentation-c-api.h @@ -1612,7 +1612,7 @@ enum { }; \ static const struct side_event_description __attribute__((section("side_event_description_ptr"), used)) \ *side_event_ptr__##_identifier = &(_identifier); \ - SIDE_POP_DIAGNOSTIC() SIDE_ACCEPT_COMMA() + SIDE_POP_DIAGNOSTIC() SIDE_EXPECT_SEMICOLON() /* * In C++, it is not possible to forward declare a static variable. Use diff --git a/include/side/macros.h b/include/side/macros.h index b0388d3..d6eff0f 100644 --- a/include/side/macros.h +++ b/include/side/macros.h @@ -27,8 +27,8 @@ #define SIDE_CAT2_PRIMITIVE(x, y...) x ## y #define SIDE_CAT2(x, y...) SIDE_CAT2_PRIMITIVE(x, y) -/* Accept a trailing comma. */ -#define SIDE_ACCEPT_COMMA(...) side_static_assert(1, "", _) +/* Expect a trailing semicolon. */ +#define SIDE_EXPECT_SEMICOLON(...) side_static_assert(1, "", _) /* * The diagnostic macros can be used to turn-off warnings using inline _Pragma.