scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit 68ab5ce9603446bf4a4098e7d03f32f9be99171f
parent d6f2174895d35fd88a9e2095800f15a032ff1c9d
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Thu, 13 Aug 2015 12:34:30 +0200

Do not warning in forward references

Diffstat:
Mcc1/decl.c | 10++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/cc1/decl.c b/cc1/decl.c @@ -521,8 +521,14 @@ identifier(struct decl *dcl) if (!name) { sym->type = tp; - warn("empty declaration"); - return sym; + switch (tp->op) { + default: + warn("empty declaration"); + case STRUCT: + case UNION: + case ENUM: + return sym; + } } /* TODO: Add warning about ANSI limits */