ref: 65d6ca357dd5101c7ef095b30ad021ba1339c96f
parent: e8eb00c8f615dd5820f1e0b4c4e88cdd53c48b68
author: Roberto E. Vargas Caballero <[email protected]>
date: Tue Apr 15 09:11:54 EDT 2014
Update storage class of funcion-scope variables
--- a/decl.c
+++ b/decl.c
@@ -436,7 +436,14 @@
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(','));