Commit da261141 authored by Sebastian Ramacher's avatar Sebastian Ramacher
Browse files

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).
parent 9d00d67e
......@@ -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);
......
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