diff --git a/zathura.c b/zathura.c index 12ee8a6..dfa4f5e 100644 --- a/zathura.c +++ b/zathura.c @@ -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);