aboutsummaryrefslogtreecommitdiffstats
path: root/include/stdnoreturn.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/stdnoreturn.h')
-rw-r--r--include/stdnoreturn.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/include/stdnoreturn.h b/include/stdnoreturn.h
index 59e2ceb..2aad0c4 100644
--- a/include/stdnoreturn.h
+++ b/include/stdnoreturn.h
@@ -23,17 +23,23 @@
#if !defined(_SLIBC_SUPPRESS_WARNINGS) && !defined(__C99__)
# warning "<stdnoreturn.h> requires that C11 or newer revision is used."
#endif
+#if !defined(_SLIBC_SUPPRESS_WARNINGS) && defined(__PORTABLE)
+# warning "<stdnoreturn.h> is not portable because it conflicts with some compilers."
+#endif
+#if !defined(__PORTABLE)
/**
* Specifies that a function never returns, that is,
- * the process exits before the function returns.
+ * the process exits or changes process image before
+ * the function returns.
*/
-#if !defined(__C11__) && defined(__GNUC__)
-# define _Noreturn __attribute__((noreturn))
+# if !defined(__C11__) && defined(__GNUC__)
+# define _Noreturn __attribute__((__noreturn__))
+# endif
+# define noreturn _Noreturn
#endif
-#define noreturn _Noreturn