From: johanknol Date: Sun, 23 Sep 2001 16:30:33 +0000 (+0000) Subject: Now --lesspedantic kills EVELYN the modified DOG X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=52922c7343d4dfe7122d0d905691513cb2724da7;p=fw%2Fsdcc Now --lesspedantic kills EVELYN the modified DOG git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1302 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/src/SDCCcse.c b/src/SDCCcse.c index b0dc633e..1bff79e1 100644 --- a/src/SDCCcse.c +++ b/src/SDCCcse.c @@ -1016,7 +1016,9 @@ ifxOptimize (iCode * ic, set * cseSet, /* too often, if it does happen then the user pays */ /* the price */ computeControlFlow (ebbs, count, 1); - werror (W_CONTROL_FLOW, ic->filename, ic->lineno); + if (!options.lessPedantic) { + werror (W_CONTROL_FLOW, ic->filename, ic->lineno); + } return; } @@ -1030,7 +1032,9 @@ ifxOptimize (iCode * ic, set * cseSet, remiCodeFromeBBlock (ebb, ic); computeControlFlow (ebbs, count, 1); - werror (W_CONTROL_FLOW, ic->filename, ic->lineno); + if (!options.lessPedantic) { + werror (W_CONTROL_FLOW, ic->filename, ic->lineno); + } return; } diff --git a/src/SDCCglobl.h b/src/SDCCglobl.h index b887e795..99076417 100644 --- a/src/SDCCglobl.h +++ b/src/SDCCglobl.h @@ -217,6 +217,7 @@ struct options int noRegParams; /* Disable passing some parameters in registers */ int verbose; /* Show what the compiler is doing */ int shortis8bits; /* treat short like int or char */ + int lessPedantic; /* disable some warnings */ int profile; /* Turn on extra profiling information */ char *calleeSaves[128]; /* list of functions using callee save */ char *excludeRegs[32]; /* registers excluded from saving */ diff --git a/src/SDCClabel.c b/src/SDCClabel.c index 5c26ce67..99e7252a 100644 --- a/src/SDCClabel.c +++ b/src/SDCClabel.c @@ -121,7 +121,9 @@ labelIfx (iCode * ic) { /* get rid of this if */ - werror (W_CONTROL_FLOW, loop->filename, loop->lineno); + if (!options.lessPedantic) { + werror (W_CONTROL_FLOW, loop->filename, loop->lineno); + } loop->prev->next = loop->next; loop->next->prev = loop->prev; hTabDeleteItem (&labelRef, @@ -136,7 +138,9 @@ labelIfx (iCode * ic) IC_FALSE (loop)->key == IC_LABEL (loop->next)->key) { /* get rid of this if */ - werror (W_CONTROL_FLOW, loop->filename, loop->lineno); + if (!options.lessPedantic) { + werror (W_CONTROL_FLOW, loop->filename, loop->lineno); + } loop->prev->next = loop->next; loop->next->prev = loop->prev; hTabDeleteItem (&labelRef, @@ -156,8 +160,9 @@ labelIfx (iCode * ic) ((IC_TRUE (loop) && IC_TRUE (loop)->key == IC_LABEL (loop->next)->key) || (IC_FALSE (loop) && IC_FALSE (loop)->key == IC_LABEL (loop->next)->key))) { - - werror (W_CONTROL_FLOW, loop->filename, loop->lineno); + if (!options.lessPedantic) { + werror (W_CONTROL_FLOW, loop->filename, loop->lineno); + } loop->prev->next = loop->next; loop->next->prev = loop->prev; hTabDeleteItem (&labelRef, diff --git a/src/SDCCmain.c b/src/SDCCmain.c index 814bae82..4222a01d 100644 --- a/src/SDCCmain.c +++ b/src/SDCCmain.c @@ -862,6 +862,7 @@ parseCmdLine (int argc, char **argv) if (strcmp (argv[i], OPTION_LESS_PEDANTIC) == 0) { + options.lessPedantic = 1; setErrorLogLevel(ERROR_LEVEL_WARNING); continue; }