[PATCH] Add _X_NORETURN attribute

Tomas Carnecky tom at dbservice.com
Tue Dec 8 05:14:56 PST 2009


Since this attribute has been supported since GCC 2.5 only check the presence
of the GNU C compiler but not its version.

Signed-off-by: Tomas Carnecky <tom at dbservice.com>
---
 Xfuncproto.h.in |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/Xfuncproto.h.in b/Xfuncproto.h.in
index 0843491..7623356 100644
--- a/Xfuncproto.h.in
+++ b/Xfuncproto.h.in
@@ -117,4 +117,10 @@ in this Software without prior written authorization from The Open Group.
 # define _X_DEPRECATED
 #endif
 
+#if defined(__GNUC__)
+# define _X_NORETURN __attribute__((noreturn))
+#else
+# define _X_NORETURN
+#endif
+
 #endif /* _XFUNCPROTO_H_ */
-- 
1.6.5.5




More information about the xorg-devel mailing list