Add noreturn attribute to out_of_memory (closes #43)

Add __attribute__((noreturn)) to out_of_memory if supported by the compiler
(gcc, icc and clang).
This commit is contained in:
Sebastian Ramacher 2010-10-11 19:54:42 +02:00
parent 9d00d67ed2
commit da261141fd

View File

@ -21,6 +21,12 @@
/* macros */
#define LENGTH(x) (sizeof(x)/sizeof((x)[0]))
#define CLEAN(m) (m & ~(GDK_MOD2_MASK) & ~(GDK_BUTTON1_MASK) & ~(GDK_BUTTON2_MASK) & ~(GDK_BUTTON3_MASK) & ~(GDK_BUTTON4_MASK) & ~(GDK_BUTTON5_MASK) & ~(GDK_LEAVE_NOTIFY_MASK))
#if defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC) || defined(__clang__)
/* only gcc, clang and Intel's cc seem support this */
#define NORETURN __attribute__((noreturn))
#else
#define NORETURN
#endif
/* enums */
enum { NEXT, PREVIOUS, LEFT, RIGHT, UP, DOWN, BOTTOM, TOP, HIDE, HIGHLIGHT,
@ -363,7 +369,7 @@ void notify(int, const char*);
gboolean open_file(char*, char*);
gboolean open_stdin(gchar*);
void open_uri(char*);
void out_of_memory(void);
void out_of_memory(void) NORETURN;
void update_status(void);
void read_configuration_file(const char*);
void read_configuration(void);