MSVC cannot omit operand in conditional
authorAnonymous Maarten <anonymous.maarten@gmail.com>
Wed, 17 Jun 2020 11:51:02 +0000 (13:51 +0200)
committerAnonymous Maarten <anonymous.maarten@gmail.com>
Wed, 17 Jun 2020 13:10:08 +0000 (15:10 +0200)
frontends/verilog/verilog_parser.y

index b34a62248f27f4b561309d495bd83a38f3328423..15c231f3b98b1b02f4724b0b2df14ced514259a5 100644 (file)
@@ -1481,7 +1481,7 @@ enum_name_decl:
                delete $1;
                SET_AST_NODE_LOC(node, @1, @1);
                delete node->children[0];
-               node->children[0] = $2 ?: new AstNode(AST_NONE);
+               node->children[0] = $2 ? $2 : new AstNode(AST_NONE);
                astbuf2->children.push_back(node);
        }
        ;