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:46:23 +0000 (15:46 -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 2c23a54f8bc003d46446c08b187a82958b4a4348..a1750514e9ba4888801050b04fab42a469388449 100644 (file)
@@ -1064,7 +1064,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 49dbff689e9e9da835aa2186a6ec3a711192e1b9..bc394f9f8a048f9ba51575e3d9a1ac4952cf6bdb 100644 (file)
@@ -572,7 +572,7 @@ int stresstest(int nreaders)
  */
 
 static
-void usage(char *argv[]) __attribute__((noreturn));
+void usage(char *argv[]) __attribute__((__noreturn__));
 
 static
 void usage(char *argv[])
index 629c847c9306ad0ce8ff6c7254e711e73fbf4396..966706fe903447d683e5160d863eca5f9b37b38b 100644 (file)
@@ -41,7 +41,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.033201 seconds and 4 git commands to generate.