ref: 3b828bbd092e2bcdc06371f6cdb915c1fa49a6ff
parent: 4c4c232a9f307952470065c30c82048decb8c6fd
author: Roberto E. Vargas Caballero <[email protected]>
date: Tue Apr 22 13:08:30 EDT 2014
Allow conversions to void This is a valid cast from scalar types to void, so thiy must be accepted.
--- a/expr.c
+++ b/expr.c
@@ -114,7 +114,7 @@
case PTR:
if (!iscast || np->typeop == FLOAT)
return NULL;
- case INT: case FLOAT: case ENUM:
+ case INT: case FLOAT: case ENUM: case VOID:
break;
default:
return NULL;
@@ -122,7 +122,7 @@
break;
case PTR:
switch (t) {
- case ENUM: case INT: /* TODO: allow p = 0 */
+ case ENUM: case INT: case VOID: /* TODO: allow p = 0 */
if (!iscast)
return NULL;;
break;