commit 65d6ca357dd5101c7ef095b30ad021ba1339c96f parent e8eb00c8f615dd5820f1e0b4c4e88cdd53c48b68 Author: Roberto E. Vargas Caballero <k0ga@shike2.com> Date: Tue, 15 Apr 2014 13:11:54 +0200 Update storage class of funcion-scope variables Diffstat:
M | decl.c | | | 9 | ++++++++- |
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/decl.c b/decl.c @@ -436,7 +436,14 @@ decl(void) if (yytoken != ';') { do { sym = declarator(tp, NS_IDEN, ID_EXPECTED); - /* assign storage class */ + switch (sclass) { + case REGISTER: sym->s.isregister = 1; break; + case STATIC: sym->s.isstatic = 1; break; + case EXTERN: /* TODO: */; break; + case TYPEDEF: /* TODO: */;break; + case AUTO: /* TODO: */; break; + default: sym->s.isauto = 1; + } if (accept('=')) initializer(sym->type); } while (accept(','));