summaryrefslogtreecommitdiff
path: root/ast_to_hir.cpp
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-03-23 12:28:44 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-03-23 12:28:44 -0700
commitcec65a6b76290ee4da91691bd3ef01c3fb8a0c37 (patch)
treeef60de3deccbe70ea79a157e34c10c17fed5e080 /ast_to_hir.cpp
parent8400bc4d35fe7aa0ce605e4f4bb837227dfcacf9 (diff)
Generate an error for variables declared with type void
Diffstat (limited to 'ast_to_hir.cpp')
-rw-r--r--ast_to_hir.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/ast_to_hir.cpp b/ast_to_hir.cpp
index feeb0d925d..62f2068b3a 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();