mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-05 15:31:16 +00:00
expr.c:
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:
parent
cbc6c40d33
commit
329c91fce4
2 changed files with 13 additions and 4 deletions
|
@ -1401,8 +1401,16 @@ convert_nil (expr_t *e, type_t *t)
|
||||||
static int
|
static int
|
||||||
is_compare (int op)
|
is_compare (int op)
|
||||||
{
|
{
|
||||||
if (op == OR || op == AND || op == EQ || op == NE || op == LE
|
if (op == EQ || op == NE || op == LE || op == GE || op == LT || op == GT
|
||||||
|| op == GE || op == LT || op == GT || op == '>' || op == '<')
|
|| op == '>' || op == '<')
|
||||||
|
return 1;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
is_logic (int op)
|
||||||
|
{
|
||||||
|
if (op == OR || op == AND)
|
||||||
return 1;
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1562,7 +1570,7 @@ binary_expr (int op, expr_t *e1, expr_t *e2)
|
||||||
} else {
|
} else {
|
||||||
type = t1;
|
type = t1;
|
||||||
}
|
}
|
||||||
if (is_compare (op)) {
|
if (is_compare (op) || is_logic (op)) {
|
||||||
if (options.code.progsversion > PROG_ID_VERSION)
|
if (options.code.progsversion > PROG_ID_VERSION)
|
||||||
type = &type_integer;
|
type = &type_integer;
|
||||||
else
|
else
|
||||||
|
|
|
@ -180,7 +180,8 @@ WriteData (int crc)
|
||||||
for (def = pr.scope->head; def; def = def->def_next) {
|
for (def = pr.scope->head; def; def = def->def_next) {
|
||||||
if (def->local || !def->name)
|
if (def->local || !def->name)
|
||||||
continue;
|
continue;
|
||||||
if (options.traditional && *def->name == '.')
|
if (options.traditional && *def->name == '.'
|
||||||
|
&& strcmp (def->name, ".debug_file") != 0)
|
||||||
continue;
|
continue;
|
||||||
if (def->type->type == ev_func) {
|
if (def->type->type == ev_func) {
|
||||||
} else if (def->type->type == ev_field) {
|
} else if (def->type->type == ev_field) {
|
||||||
|
|
Loading…
Reference in a new issue