aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/sys.h
diff options
context:
space:
mode:
authorHenrik Nord <[email protected]>2013-12-02 15:51:11 +0100
committerHenrik Nord <[email protected]>2013-12-02 15:51:11 +0100
commit471abeb72af964049fcd3ed169d1bca7c5534d4c (patch)
tree62a18a1780b71aa285b44e703501587ded10ea05 /erts/emulator/beam/sys.h
parent026a9226fcd47d29870f5b5d879919ce4f60d785 (diff)
parent25b992335e82919d6166b860c9b97710c5f33ae1 (diff)
downloadotp-471abeb72af964049fcd3ed169d1bca7c5534d4c.tar.gz
otp-471abeb72af964049fcd3ed169d1bca7c5534d4c.tar.bz2
otp-471abeb72af964049fcd3ed169d1bca7c5534d4c.zip
Merge branch 'maint'
Diffstat (limited to 'erts/emulator/beam/sys.h')
-rw-r--r--erts/emulator/beam/sys.h38
1 files changed, 20 insertions, 18 deletions
diff --git a/erts/emulator/beam/sys.h b/erts/emulator/beam/sys.h
index d22f125945..31252ed78f 100644
--- a/erts/emulator/beam/sys.h
+++ b/erts/emulator/beam/sys.h
@@ -149,9 +149,28 @@ typedef ERTS_SYS_FD_TYPE ErtsSysFdType;
# define ERTS_EXIT_AFTER_DUMP exit
#endif
+/* In VC++, noreturn is a declspec that has to be before the types,
+ * but in GNUC it is an att ribute to be placed between return type
+ * and function name, hence __decl_noreturn <types> __noreturn <function name>
+ */
+#if __GNUC__
+# define __decl_noreturn
+# define __noreturn __attribute__((noreturn))
+#else
+# if defined(__WIN32__) && defined(_MSC_VER)
+# define __noreturn
+# define __decl_noreturn __declspec(noreturn)
+# else
+# define __noreturn
+# define __decl_noreturn
+# endif
+#endif
+
#define ERTS_ASSERT(e) \
((void) ((e) ? 1 : (erl_assert_error(#e, __func__, __FILE__, __LINE__), 0)))
-void erl_assert_error(const char* expr, const char *func, const char* file, int line);
+
+__decl_noreturn void __noreturn erl_assert_error(const char* expr, const char *func,
+ const char* file, int line);
#ifdef DEBUG
# define ASSERT(e) ERTS_ASSERT(e)
@@ -192,23 +211,6 @@ void erl_assert_error(const char* expr, const char *func, const char* file, int
# define erts_align_attribute(SZ)
#endif
-/* In VC++, noreturn is a declspec that has to be before the types,
- * but in GNUC it is an att ribute to be placed between return type
- * and function name, hence __decl_noreturn <types> __noreturn <function name>
- */
-#if __GNUC__
-# define __decl_noreturn
-# define __noreturn __attribute__((noreturn))
-#else
-# if defined(__WIN32__) && defined(_MSC_VER)
-# define __noreturn
-# define __decl_noreturn __declspec(noreturn)
-# else
-# define __noreturn
-# define __decl_noreturn
-# endif
-#endif
-
/*
** Data types:
**