aboutsummaryrefslogtreecommitdiff
path: root/tccgen.c
diff options
context:
space:
mode:
authorThomas Preud'homme <robotux@celest.fr>2014-03-31 22:58:17 +0800
committerThomas Preud'homme <robotux@celest.fr>2014-03-31 22:59:10 +0800
commit3e56584223a67a6c2f41a43cf38e0960e9992238 (patch)
tree6e3c4fd4ee3dce993b114170cbbcecd772336545 /tccgen.c
parenta620b12dc18e7e40c7497dcfb976a5628c3e57f9 (diff)
downloadtinycc-3e56584223a67a6c2f41a43cf38e0960e9992238.tar.gz
tinycc-3e56584223a67a6c2f41a43cf38e0960e9992238.tar.bz2
Allow local redefinition of enumerator
Diffstat (limited to 'tccgen.c')
-rw-r--r--tccgen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tccgen.c b/tccgen.c
index 3171720..84188ad 100644
--- a/tccgen.c
+++ b/tccgen.c
@@ -2827,7 +2827,7 @@ static void struct_decl(CType *type, int u, int tdef)
if (v < TOK_UIDENT)
expect("identifier");
ss = sym_find(v);
- if (ss)
+ if (ss && !local_stack)
tcc_error("redefinition of enumerator '%s'",
get_tok_str(v, NULL));
next();