qcc actually had the precedence of "!x && y" correct, so don't invert
	the logic for it in traditional code.
qfcc.c:
	allow the .debug_file def to be emitted in traditional mode.
This commit is contained in:
Bill Currie 2003-08-05 17:48:16 +00:00
parent cbc6c40d33
commit 329c91fce4
2 changed files with 13 additions and 4 deletions

View file

@ -1401,8 +1401,16 @@ convert_nil (expr_t *e, type_t *t)
static int
is_compare (int op)
{
if (op == OR || op == AND || op == EQ || op == NE || op == LE
|| op == GE || op == LT || op == GT || op == '>' || op == '<')
if (op == EQ || op == NE || op == LE || op == GE || op == LT || op == GT
|| op == '>' || op == '<')
return 1;
return 0;
}
static int
is_logic (int op)
{
if (op == OR || op == AND)
return 1;
return 0;
}
@ -1562,7 +1570,7 @@ binary_expr (int op, expr_t *e1, expr_t *e2)
} else {
type = t1;
}
if (is_compare (op)) {
if (is_compare (op) || is_logic (op)) {
if (options.code.progsversion > PROG_ID_VERSION)
type = &type_integer;
else

View file

@ -180,7 +180,8 @@ WriteData (int crc)
for (def = pr.scope->head; def; def = def->def_next) {
if (def->local || !def->name)
continue;
if (options.traditional && *def->name == '.')
if (options.traditional && *def->name == '.'
&& strcmp (def->name, ".debug_file") != 0)
continue;
if (def->type->type == ev_func) {
} else if (def->type->type == ev_field) {