diff --git a/tools/qfcc/include/expr.h b/tools/qfcc/include/expr.h index 5c1a5709d..b5c918df4 100644 --- a/tools/qfcc/include/expr.h +++ b/tools/qfcc/include/expr.h @@ -386,9 +386,9 @@ typedef struct expr_s { expr_type type; ///< the type of the result of this expression int printid; ///< avoid duplicate output when printing unsigned id; - unsigned paren:1; ///< the expression is enclosed in () - unsigned implicit:1; ///< don't warn for implicit casts - unsigned nodag:1; ///< prevent use of dags for this expression + bool paren:1; ///< the expression is enclosed in () + bool implicit:1; ///< don't warn for implicit casts + bool nodag:1; ///< prevent use of dags for this expression ///< propagates up union { ex_label_t label; ///< label expression diff --git a/tools/qfcc/source/expr.c b/tools/qfcc/source/expr.c index 31061342f..df54681ff 100644 --- a/tools/qfcc/source/expr.c +++ b/tools/qfcc/source/expr.c @@ -637,7 +637,7 @@ paren_expr (const expr_t *e) { auto paren = new_expr (); *paren = *e; - paren->paren = 1; + paren->paren = true; return paren; } diff --git a/tools/qfcc/source/expr_type.c b/tools/qfcc/source/expr_type.c index 263b2d76a..6eaf4978e 100644 --- a/tools/qfcc/source/expr_type.c +++ b/tools/qfcc/source/expr_type.c @@ -684,7 +684,7 @@ type_function (int op, const expr_t *params) } auto te = new_expr (); te->type = ex_type; - te->nodag = 1; + te->nodag = true; te->typ = (ex_type_t) { .op = op, .params = params, diff --git a/tools/qfcc/source/glsl-parse.y b/tools/qfcc/source/glsl-parse.y index 48a01eeaa..d64032426 100644 --- a/tools/qfcc/source/glsl-parse.y +++ b/tools/qfcc/source/glsl-parse.y @@ -374,7 +374,7 @@ primary_exprsssion auto val = new_type_value (&type_bool, &data); $$ = new_value_expr (val, false); } - | '(' expression ')' { $$ = $2; ((expr_t *) $$)->paren = 1; } + | '(' expression ')' { $$ = paren_expr ($2); } ; postfix_expression