Skip to content
Snippets Groups Projects
Commit 000ff871 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

error.c: elide __attribute for non GNU C

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