when compiling sdcc files SDCCgen.c and ralloc.cc emit warnings which in 2 cases point to programming errors and in others may do so.
frequent: ../SDCCgen.h:56:3: warning: anonymous structs are a Microsoft extension [-Wmicrosoft]
That's just stupid.
as can seen from the invocation gcc -fms-extensions -pipe -ggdb -Wno-deprecated -Wall -Wno-parentheses -I. -I.. -I./../support/util -I. -I. -c SDCCy.c -o SDCCy.o ms-extensions are enabled explicitely, but then the warning should be supressed at the same point as well.
at 2 points: SDCCopt.c:1122:101: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]
i assume this is an error in both cases.
lots: ralloc2.cc:78:126: warning: '&&' within '||' [-Wlogical-op-parentheses]
i hope at least the original the programmer was aware of exact operator precedence in every case when he wrote this. for the sake of maintainability and to supress the warnings there should be brackets added.
once: ralloc2.cc:1437:15: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
this may or may be not an error. brackets should be added in case this is an assignment.
at least the two comparisson bugs should be fixed.
for locations of warnings see attached file or just compile sdcc yourself and take a look at the compiler output!
tested with sdcc 3.3.0 and svn trunk head.