From 919910312d7d25fe8f894adbc9ff8a449ac26281 Mon Sep 17 00:00:00 2001 From: Josh Wolfe Date: Wed, 12 Apr 2017 16:49:47 -0700 Subject: make it an error to ignore a statement's value this makes {1;} an error. --- src/analyze.cpp | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'src/analyze.cpp') diff --git a/src/analyze.cpp b/src/analyze.cpp index 1f2d014393..5a38f0c11c 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -2987,23 +2987,6 @@ void semantic_analyze(CodeGen *g) { } } -bool is_node_void_expr(AstNode *node) { - if (node->type == NodeTypeContainerInitExpr && - node->data.container_init_expr.kind == ContainerInitKindArray) - { - AstNode *type_node = node->data.container_init_expr.type; - if (type_node->type == NodeTypeSymbol && - buf_eql_str(type_node->data.symbol_expr.symbol, "void")) - { - return true; - } - } else if (node->type == NodeTypeBlock && node->data.block.statements.length == 0) { - return true; - } - - return false; -} - TypeTableEntry **get_int_type_ptr(CodeGen *g, bool is_signed, uint32_t size_in_bits) { size_t index; if (size_in_bits == 8) { -- cgit v1.2.3