Fix: use __noreturn__ for C11-compatibility
authorOndřej Surý <ondrej@sury.org>
Fri, 17 Mar 2023 15:44:10 +0000 (16:44 +0100)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 23 Mar 2023 19:47:46 +0000 (15:47 -0400)
The noreturn convenience macro provided by stdnoreturn.h might get
included before urcu headers, use __noreturn__ for better compatibility
with code using <stdnoreturn.h> header.

Signed-off-by: Ondřej Surý <ondrej@sury.org>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/urcu/uatomic/generic.h
src/urcu-call-rcu-impl.h
tests/regression/rcutorture.h
tests/utils/tap.h

index 89d1cfa98c1ab198cc8f628a0e28fdaadfbd5f90..c3762b0780b1f80c93c566012d8b904bd1984dbc 100644 (file)
@@ -38,7 +38,7 @@ extern "C" {
 #endif
 
 #if !defined __OPTIMIZE__  || defined UATOMIC_NO_LINK_ERROR
-static inline __attribute__((always_inline, noreturn))
+static inline __attribute__((always_inline, __noreturn__))
 void _uatomic_link_error(void)
 {
 #ifdef ILLEGAL_INSTR
index 187727e4137083d975fb3268c7c9106f4bcb7417..cc76f533d0b7a1ebe001c3da4184c9c81612843f 100644 (file)
@@ -1055,7 +1055,7 @@ void urcu_register_rculfhash_atfork(struct urcu_atfork *atfork)
  * This unregistration function is deprecated, meant only for internal
  * use by rculfhash.
  */
-__attribute__((noreturn))
+__attribute__((__noreturn__))
 void urcu_unregister_rculfhash_atfork(struct urcu_atfork *atfork __attribute__((unused)))
 {
        urcu_die(EPERM);
index ac5348cd465f004179839b14986e91e0781d7125..c4455a05aceab1214a3835ddc2ed16020b96fad3 100644 (file)
@@ -532,7 +532,7 @@ int stresstest(int nreaders)
  */
 
 static
-void usage(char *argv[]) __attribute__((noreturn));
+void usage(char *argv[]) __attribute__((__noreturn__));
 
 static
 void usage(char *argv[])
index 39312fcb2e5a4b425b803a2c68c8f782cb4df93d..b64a470bacec7dcda63cf4a212ddeb7df8a9dddd 100644 (file)
@@ -64,7 +64,7 @@ __attribute__((format(TAP_PRINTF_FORMAT, 5, 6)))
 unsigned int _gen_result(int, const char *, const char *, unsigned int, const char *, ...);
 
 int plan_no_plan(void);
-__attribute__((noreturn))
+__attribute__((__noreturn__))
 int plan_skip_all(const char *);
 int plan_tests(unsigned int);
 
This page took 0.028797 seconds and 4 git commands to generate.