From cec65a6b76290ee4da91691bd3ef01c3fb8a0c37 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Tue, 23 Mar 2010 12:28:44 -0700 Subject: [PATCH] Generate an error for variables declared with type void --- ast_to_hir.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ast_to_hir.cpp b/ast_to_hir.cpp index feeb0d925dd..62f2068b3a2 100644 --- a/ast_to_hir.cpp +++ b/ast_to_hir.cpp @@ -841,7 +841,7 @@ ast_declarator_list::hir(exec_list *instructions, * FINISHME: declaration at a higher scope. */ - if (decl_type == NULL) { + if ((decl_type == NULL) || decl_type->is_void()) { YYLTYPE loc; loc = this->get_location(); -- 2.30.2