- Fix ? expressions previously they were reversed.
authorEric Biederman <ebiederm@xmission.com>
Fri, 16 May 2003 20:47:48 +0000 (20:47 +0000)
committerEric Biederman <ebiederm@xmission.com>
Fri, 16 May 2003 20:47:48 +0000 (20:47 +0000)
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@830 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1

util/romcc/romcc.c

index fbbd0ea0d2da626bb417bbc43b813f4deb59b553..386aa06b8198c9830d0a76b94e63d111d3037b96 100644 (file)
@@ -4307,6 +4307,8 @@ static struct triple *cond_expr(
        if (!result_type) {
                error(state, 0, "Incompatible types in conditional expression");
        }
+       /* Cleanup and invert the test */
+       test = lfalse_expr(state, read_expr(state, test));
        def = new_triple(state, OP_COND, result_type, 3);
        def->param[0] = test;
        def->param[1] = left;