Commit 000ff871 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

error.c: elide __attribute for non GNU C

parent 01bb759b
...@@ -55,7 +55,10 @@ void Error_(const char *caller, const char *fmt, ...) ...@@ -55,7 +55,10 @@ void Error_(const char *caller, const char *fmt, ...)
typedef void (*cdiAbortCFunc)(const char * caller, const char * filename, typedef void (*cdiAbortCFunc)(const char * caller, const char * filename,
const char *functionname, int line, const char *functionname, int line,
const char * errorString, va_list ap) const char * errorString, va_list ap)
__attribute__((noreturn)); #ifdef __GNUC__
__attribute__((noreturn))
#endif
;
void cdiAbortC(const char * caller, const char * filename, void cdiAbortC(const char * caller, const char * filename,
const char *functionname, int line, const char *functionname, int line,
......
...@@ -46,10 +46,13 @@ void cdiAbortC(const char *caller, const char *filename, ...@@ -46,10 +46,13 @@ void cdiAbortC(const char *caller, const char *filename,
const char *functionname, int line, const char *functionname, int line,
const char *errorString, ... ) const char *errorString, ... )
__attribute__((noreturn)); __attribute__((noreturn));
#define xabortC(caller, ...) \ #define xabortC(caller, ...) \
cdiAbortC(caller, __FILE__, __func__, __LINE__, __VA_ARGS__ ) cdiAbortC(caller, __FILE__, __func__, __LINE__, __VA_ARGS__ )
#define xabort(...) \ #define xabort(...) \
cdiAbortC(NULL, __FILE__, __func__, __LINE__, __VA_ARGS__ ) cdiAbortC(NULL, __FILE__, __func__, __LINE__, __VA_ARGS__ )
#define cdiAbort(file, func, line, ...) \ #define cdiAbort(file, func, line, ...) \
cdiAbortC(NULL, (file), (func), (line), __VA_ARGS__) cdiAbortC(NULL, (file), (func), (line), __VA_ARGS__)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment