From c6605cba8375871a145896f9cf1090e9c823214a Mon Sep 17 00:00:00 2001 From: Josh Wolfe Date: Sun, 23 Apr 2017 16:59:55 -0700 Subject: blocks check that their statements are void closes #291 This changes the error message "return value ignored" to "expression value is ignored". This is because this error also applies to {1;}, which has no function calls. Also fix ignored expression values in std and test. This caught a bug in debug.readAllocBytes where an early Eof error would have been missed. See #219. --- src/codegen.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/codegen.cpp') diff --git a/src/codegen.cpp b/src/codegen.cpp index c89e9ad7e6..5e31abc62e 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -2885,6 +2885,7 @@ static LLVMValueRef ir_render_instruction(CodeGen *g, IrExecutable *executable, case IrInstructionIdTestComptime: case IrInstructionIdGeneratedCode: case IrInstructionIdCheckSwitchProngs: + case IrInstructionIdCheckStatementIsVoid: case IrInstructionIdTestType: case IrInstructionIdTypeName: case IrInstructionIdCanImplicitCast: -- cgit v1.2.3