fix: warning 'noreturn' function does return on ppc
[urcu.git] / include / urcu / uatomic / generic.h
index c3762b0780b1f80c93c566012d8b904bd1984dbc..e31a19be7b269fbacb090ac349d4df45b433ac7e 100644 (file)
@@ -38,19 +38,23 @@ extern "C" {
 #endif
 
 #if !defined __OPTIMIZE__  || defined UATOMIC_NO_LINK_ERROR
-static inline __attribute__((always_inline, __noreturn__))
+#ifdef ILLEGAL_INSTR
+static inline __attribute__((always_inline))
 void _uatomic_link_error(void)
 {
-#ifdef ILLEGAL_INSTR
        /*
         * generate an illegal instruction. Cannot catch this with
         * linker tricks when optimizations are disabled.
         */
        __asm__ __volatile__(ILLEGAL_INSTR);
+}
 #else
+static inline __attribute__((always_inline, __noreturn__))
+void _uatomic_link_error(void)
+{
        __builtin_trap();
-#endif
 }
+#endif
 
 #else /* #if !defined __OPTIMIZE__  || defined UATOMIC_NO_LINK_ERROR */
 extern void _uatomic_link_error(void);
This page took 0.030017 seconds and 4 git commands to generate.