From: Wolfgang (Blub) Bumiller Date: Sat, 18 Aug 2012 12:36:33 +0000 (+0200) Subject: replacing WARN_ERROR with opts_werror X-Git-Tag: 0.1-rc1~228 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b421c42d4bdcbf4b6bfe9d1d4d40194582f15af1;p=xonotic%2Fgmqcc.git replacing WARN_ERROR with opts_werror --- diff --git a/gmqcc.h b/gmqcc.h index e078494..9d34199 100644 --- a/gmqcc.h +++ b/gmqcc.h @@ -993,6 +993,7 @@ extern int opts_standard; extern bool opts_debug; extern bool opts_memchk; extern bool opts_dump; +extern bool opts_werror; /*===================================================================*/ #define OPTS_FLAG(i) (!! (opts_flags[(i)/32] & (1<< ((i)%32)))) diff --git a/main.c b/main.c index 272c493..36d757b 100644 --- a/main.c +++ b/main.c @@ -31,6 +31,7 @@ int opts_standard = COMPILER_GMQCC; bool opts_debug = false; bool opts_memchk = false; bool opts_dump = false; +bool opts_werror = false; static bool opts_output_wasset = false; @@ -230,6 +231,14 @@ static bool options_parse(int argc, char **argv) { } exit(0); } + else if (!strcmp(argv[0]+2, "NO_ERROR")) { + opts_werror = false; + break; + } + else if (!strcmp(argv[0]+2, "ERROR")) { + opts_werror = true; + break; + } else if (!strcmp(argv[0]+2, "ALL")) { for (itr = 0; itr < sizeof(opts_warn)/sizeof(opts_warn[0]); ++itr) opts_warn[itr] = 0xFFFFFFFFL; diff --git a/warns.def b/warns.def index 6cfb951..3136956 100644 --- a/warns.def +++ b/warns.def @@ -7,4 +7,3 @@ GMQCC_DEFINE_FLAG(UNUSED_VARIABLE) GMQCC_DEFINE_FLAG(UNKNOWN_CONTROL_SEQUENCE) GMQCC_DEFINE_FLAG(EXTENSIONS) GMQCC_DEFINE_FLAG(FIELD_REDECLARED) -GMQCC_DEFINE_FLAG(ERROR)