mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 04:42:32 +00:00
[qfcc] Handle bitwise not of enums
It looks like I need to handle other unary expressions too, but another time.
This commit is contained in:
parent
f3236410d0
commit
0bb4279a9f
1 changed files with 6 additions and 0 deletions
|
@ -1407,6 +1407,7 @@ unary_expr (int op, expr_t *e)
|
||||||
quat_t q;
|
quat_t q;
|
||||||
const char *s;
|
const char *s;
|
||||||
expr_t *new;
|
expr_t *new;
|
||||||
|
type_t *t;
|
||||||
|
|
||||||
convert_name (e);
|
convert_name (e);
|
||||||
if (e->type == ex_error)
|
if (e->type == ex_error)
|
||||||
|
@ -1568,6 +1569,11 @@ unary_expr (int op, expr_t *e)
|
||||||
case ev_short:
|
case ev_short:
|
||||||
return new_short_expr (~expr_short (e));
|
return new_short_expr (~expr_short (e));
|
||||||
case ev_invalid:
|
case ev_invalid:
|
||||||
|
t = get_type (e);
|
||||||
|
if (t->meta == ty_enum) {
|
||||||
|
return new_integer_expr (~expr_integer (e));
|
||||||
|
}
|
||||||
|
break;
|
||||||
case ev_type_count:
|
case ev_type_count:
|
||||||
case ev_void:
|
case ev_void:
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue