ref: 1344701bd8e23e73e5f94096485553b534ba4890
parent: 3e74db0e8da377cee03ec3c7825ddad168045055
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Fri Aug 25 11:09:53 EDT 2017
[cc1] Forbid array of voids It is impossible to have an array of voids, because it is impossible to declare a variable of type void.
--- a/cc1/types.c
+++ b/cc1/types.c
@@ -298,6 +298,10 @@
switch (op) {
case ARY:
+ if (tp == voidtype) {
+ errorp("declaration of symbol as array of voids");
+ tp = inttype;
+ }
type.letter = L_ARRAY;
if (nelem != 0)
type.prop |= TDEFINED;