From: Dale Weiler Date: Wed, 30 Jan 2013 06:14:35 +0000 (+0000) Subject: It is used, gcc is a liar. X-Git-Tag: before-library~189 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=44c87bedfcbf2bd7aed74ef2590fc5c54cbdd263;p=xonotic%2Fgmqcc.git It is used, gcc is a liar. --- diff --git a/gmqcc.h b/gmqcc.h index dd5dbc7..ab585d5 100644 --- a/gmqcc.h +++ b/gmqcc.h @@ -102,8 +102,10 @@ GMQCC_IND_STRING(GMQCC_VERSION_PATCH) \ */ #if defined(__GNUC__) || defined(__CLANG__) # define GMQCC_WARN __attribute__((warn_unused_result)) +# define GMQCC_USED __attribute__((used)) #else # define GMQCC_WARN +# define GMQCC_USED #endif /* * This is a hack to silent clang regarding empty @@ -1133,7 +1135,7 @@ enum { }; -static const char *opts_options_descriptions[] = { +GMQCC_USED static const char *opts_options_descriptions[] = { # define GMQCC_TYPE_OPTIONS # define GMQCC_DEFINE_FLAG(X, Y) Y, # include "opts.def"