[hackers] [scc] Allow typedef of incomplete types || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Thu, 27 Aug 2015 16:16:37 +0200 (CEST)

commit a9f59c62a1ef80c97cbf32e3aa11410f7ef9f455
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Thu Aug 27 15:57:24 2015 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Thu Aug 27 15:57:24 2015 +0200

    Allow typedef of incomplete types

diff --git a/cc1/decl.c b/cc1/decl.c
index b87ff34..62ea6f1 100644
--- a/cc1/decl.c
+++ b/cc1/decl.c
_AT_@ -572,8 +572,8 @@ identifier(struct decl *dcl)
         }
 
         /* 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)
Received on Thu Aug 27 2015 - 16:16:37 CEST

This archive was generated by hypermail 2.3.0 : Thu Aug 27 2015 - 16:24:14 CEST