summaryrefslogtreecommitdiffhomepage
path: root/ir/common
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2014-05-27 10:39:53 +0200
committerMatthias Braun <matze@braunis.de>2014-05-28 17:07:11 +0200
commitf3d52124afebf57332a06069540ed402e24b916f (patch)
tree6aebf1b21c30dcebbf9533b077bc4d229aa0953f /ir/common
parent88b246dc6776a17ad3bec52b6887fc388adc74aa (diff)
reorganize noreturn,printf,nothrow attributes in funcattr.h
Diffstat (limited to 'ir/common')
-rw-r--r--ir/common/error.c3
-rw-r--r--ir/common/error.h29
2 files changed, 5 insertions, 27 deletions
diff --git a/ir/common/error.c b/ir/common/error.c
index 2e1ab06..a7ddc31 100644
--- a/ir/common/error.c
+++ b/ir/common/error.c
@@ -15,7 +15,8 @@
#include "error.h"
#include "irprintf.h"
-NORETURN (panic)(char const *const file, int const line, char const *const func, char const *const fmt, ...)
+FIRM_NORETURN (panic)(char const *const file, int const line,
+ char const *const func, char const *const fmt, ...)
{
va_list ap;
diff --git a/ir/common/error.h b/ir/common/error.h
index 45a05d8..6a6e5ed 100644
--- a/ir/common/error.h
+++ b/ir/common/error.h
@@ -11,36 +11,13 @@
#ifndef FIRM_COMMON_ERROR_H
#define FIRM_COMMON_ERROR_H
-/**
- * @file
- *
- * Error handling for libFirm.
- *
- * @author Michael Beck
- */
-
-/* define a NORETURN attribute */
-#ifndef NORETURN
-# if defined(__GNUC__)
-# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 70)
-# define NORETURN void __attribute__ ((noreturn))
-# endif /* __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 70) */
-# endif /* defined(__GNUC__) */
-
-# if defined(_MSC_VER)
-# define NORETURN void __declspec(noreturn)
-# endif /* defined(_MSC_VER) */
-
-/* If not set above, use "void" for DOES_NOT_RETURN. */
-# ifndef NORETURN
-# define NORETURN void
-# endif /* ifndef NORETURN */
-#endif /* ifndef NORETURN */
+#include "funcattr.h"
/**
* Prints a panic message to stderr and exits.
*/
-NORETURN panic(char const *file, int line, char const *func, char const *fmt, ...);
+FIRM_NORETURN panic(char const *file, int line, char const *func,
+ char const *fmt, ...);
#define panic(...) panic(__FILE__, __LINE__, __func__, __VA_ARGS__)