if(v->type == D_REG) {
if(v->reg <= REGEXT && v->reg > exregoffset)
return 2;
- if(v->reg == REGARG)
+ if(v->reg == (uchar)REGARG)
return 2;
}
if(v->type == D_FREG)
case ATEXT: /* funny */
if(v->type == D_REG)
- if(v->reg == REGARG)
+ if(v->reg == (uchar)REGARG)
return 3;
return 0;
}
void
regaalloc1(Node *n, Node *nn)
{
+ if(REGARG < 0) {
+ fatal(n, "regaalloc1 and REGARG<0");
+ return;
+ }
nodreg(n, nn, REGARG);
reg[REGARG]++;
curarg = align(curarg, nn->type, Aarg1, nil);
return 3;
case ACALL: /* funny */
- if(REGARG >= 0 && v->type == REGARG)
+ if(REGARG >= 0 && v->type == (uchar)REGARG)
return 2;
if(s != A) {
return 3;
case ATEXT: /* funny */
- if(REGARG >= 0 && v->type == REGARG)
+ if(REGARG >= 0 && v->type == (uchar)REGARG)
return 3;
return 0;
}
void
regaalloc1(Node *n, Node *nn)
{
- if(REGARG < 0)
- diag(n, "regaalloc1 and REGARG<0");
+ if(REGARG < 0) {
+ fatal(n, "regaalloc1 and REGARG<0");
+ return;
+ }
nodreg(n, nn, REGARG);
reg[REGARG]++;
curarg = align(curarg, nn->type, Aarg1, nil);
return 3;
case ACALL: /* funny */
- if(REGARG >= 0 && v->type == REGARG)
+ if(REGARG >= 0 && v->type == (uchar)REGARG)
return 2;
if(s != A) {
void
regaalloc1(Node *n, Node *nn)
{
+ if(REGARG < 0) {
+ fatal(n, "regaalloc1 and REGARG<0");
+ return;
+ }
nodreg(n, nn, REGARG);
reg[REGARG]++;
curarg = align(curarg, nn->type, Aarg1, nil);
tmp=/tmp/qcc.$$.$USER.out
$gcc -Wall -Wno-sign-compare -Wno-missing-braces \
-Wno-parentheses -Wno-unknown-pragmas -Wno-switch -Wno-comment \
+ -Werror \
"$@" >$tmp 2>&1
status=$?
egrep -v "$ignore" $tmp | uniq | tee $tmp.1
-# Make incompatible pointer type "warnings" stop the build.
-# Not quite perfect--we should remove the object file--but
-# a step in the right direction.
-if egrep 'incompatible pointer type' $tmp.1 >/dev/null; then
- status=1
-fi
rm -f $tmp $tmp.1
exit $status