summary refs log tree commit diff
path: root/misc
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2014-03-28 11:59:41 -0700
committerWill Newton <will.newton@linaro.org>2014-07-02 10:31:42 +0100
commitc4c4124473c187b5c4642611390897666c3d3970 (patch)
tree811c9576d8631a753c422c0189a195d285037dcd /misc
parente1e041c439b5bccc756b64fbaf97e2d3f11a9b0d (diff)
downloadglibc-c4c4124473c187b5c4642611390897666c3d3970.tar.gz
glibc-c4c4124473c187b5c4642611390897666c3d3970.tar.xz
glibc-c4c4124473c187b5c4642611390897666c3d3970.zip
misc/sys/cdefs.h: Add _Noreturn macro for pre-C11 compilers
2014-07-02  Will Newton  <will.newton@linaro.org>
	    Paul Eggert  <eggert@cs.ucla.edu>

	* misc/sys/cdefs.h (_Noreturn): New macro, for pre-C11 compilers.
Diffstat (limited to 'misc')
-rw-r--r--misc/sys/cdefs.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h
index 4d958ea066..a5c3224a64 100644
--- a/misc/sys/cdefs.h
+++ b/misc/sys/cdefs.h
@@ -382,6 +382,14 @@
 # define __glibc_likely(cond)	(cond)
 #endif
 
+#if !defined _Noreturn && __STDC_VERSION__ < 201112 && !__GNUC_PREREQ (4,7)
+# if __GNUC_PREREQ (2,8)
+#  define _Noreturn __attribute__ ((__noreturn__))
+# else
+#  define _Noreturn
+# endif
+#endif
+
 #include <bits/wordsize.h>
 
 #if defined __LONG_DOUBLE_MATH_OPTIONAL && defined __NO_LONG_DOUBLE_MATH