From 49bb172a0948d2aa665dbc7fd1a41e595ef871f5 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Thu, 14 Nov 2013 11:41:11 +0100 Subject: [PATCH] folder: change ~ for floats too --- fold.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fold.c b/fold.c index 48ae6f1..c75106a 100644 --- a/fold.c +++ b/fold.c @@ -616,7 +616,7 @@ static GMQCC_INLINE ast_expression *fold_op_cmp(fold_t *fold, ast_value *a, ast_ static GMQCC_INLINE ast_expression *fold_op_bnot(fold_t *fold, ast_value *a) { if (isfloat(a)) { if (fold_can_1(a)) - return fold_constgen_float(fold, ~((qcint_t)fold_immvalue_float(a))); + return fold_constgen_float(fold, -1-fold_immvalue_float(a)); } else { if (isvector(a)) { if (fold_can_1(a)) -- 2.39.2