File binutils-fix-c23.diff of Package binutils
commit 5f66aee7f4bec7a2d8378034116f5e5c3dc50f41
Author: Andreas Schwab <schwab@suse.de>
Date: Sat Nov 22 11:29:43 2025 +0100
gprofng: protect against standard library macros
The CALL_UTIL macro can expand to an unparsable expression of the argument
is a macro, like with the new const-preserving standard library macros in
C23.
* gprofng/src/collector_module.h (CALL_UTIL): Add parens to not
expand its argument if it is a function-like macro.
diff --git a/gprofng/src/collector_module.h b/gprofng/src/collector_module.h
index b64d69c45ab..859a6dd1f7d 100644
--- a/gprofng/src/collector_module.h
+++ b/gprofng/src/collector_module.h
@@ -119,7 +119,7 @@ typedef struct CollectorUtilFuncs
extern CollectorUtilFuncs __collector_util_funcs;
extern int __collector_dlsym_guard;
-#define CALL_UTIL(x) __collector_util_funcs.x
+#define CALL_UTIL(x) (__collector_util_funcs.x)
/* The following constants define the meaning of the "void *arg"
* argument of getFrameInfo().