shithub: scc

Download patch

ref: a9f59c62a1ef80c97cbf32e3aa11410f7ef9f455
parent: acb25bfdff10aebe18b8edbc1c697fc1da9a64a3
author: Roberto E. Vargas Caballero <[email protected]>
date: Thu Aug 27 11:57:24 EDT 2015

Allow typedef of incomplete types

--- a/cc1/decl.c
+++ b/cc1/decl.c
@@ -572,8 +572,8 @@
 	}
 
 	/* TODO: Add warning about ANSI limits */
-	if (!tp->defined && sclass != EXTERN)
-		error("declared variable '%s' of incomplete type", name);
+	if (!tp->defined && sclass != EXTERN && sclass != TYPEDEF)
+		errorp("declared variable '%s' of incomplete type", name);
 
 	if (tp->op == FTN) {
 		if (sclass == NOSCLASS)