Generate an error for variables declared with type void

This commit is contained in:
Ian Romanick
2010-03-23 12:28:44 -07:00
parent 8400bc4d35
commit cec65a6b76

View File

@@ -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();