}
e->guards = guardSet_new ();
+
e->sets = sRefSet_new ();
e->msets = sRefSet_new ();
e->uses = sRefSet_new ();
case 'i':
case 'd':
+ expecttype = ctype_makePointer (ctype_combine (ctype_int, modtype));
+ /*@switchbreak@*/ break;
+
case 'x':
case 'X': /* unsigned int */
- expecttype = ctype_makePointer (ctype_combine (ctype_int, modtype));
+ expecttype = ctype_makePointer (ctype_combine (ctype_uint, modtype));
/*@switchbreak@*/ break;
case 'e':
f->guards = guardSet_union (f->guards, a->guards);
DPRINTF (("match arg: %s / %s", ctype_unparse (ct), ctype_unparse (a->typ)));
-
+
if (!(exprNode_matchArgType (ct, a)))
{
DPRINTF (("Args mismatch!"));
if (opid == OR_OP)
{
+ exprNode_produceGuards (e2);
ret->guards = guardSet_or (ret->guards, e2->guards);
}
else if (opid == AND_OP)
{
+ exprNode_produceGuards (e2); /* evans 2003-08-13: need to produce guards for expression */
+ /* Shouldn't this have already happened? */
+ DPRINTF (("Anding guards: %s / %s", guardSet_unparse (ret->guards), guardSet_unparse (e2->guards)));
ret->guards = guardSet_and (ret->guards, e2->guards);
}
else
}
else
{
- voptgenerror
- (FLG_REALCOMPARE,
- message ("Dangerous comparison involving %s types: %s",
- ctype_unparse (rtype),
- exprNode_unparse (ret)),
- ret->loc);
+ if (opid == EQ_OP || opid == NE_OP)
+ {
+ voptgenerror
+ (FLG_REALCOMPARE,
+ message ("Dangerous equality comparison involving %s types: %s",
+ ctype_unparse (rtype),
+ exprNode_unparse (ret)),
+ ret->loc);
+ }
+ else
+ {
+ voptgenerror
+ (FLG_REALRELATECOMPARE,
+ message ("Possibly dangerous relational comparison involving %s types: %s",
+ ctype_unparse (rtype),
+ exprNode_unparse (ret)),
+ ret->loc);
+ }
}
}
/*@fallthrough@*/