+ if (Decl.Ident[0] == '\0') {
+ AnonName (Decl.Ident, "param");
+ }
+
+ /* Handle anything that needs storage (no functions, no typdefs) */
+ if ((Decl.StorageClass & SC_FUNC) != SC_FUNC &&
+ (Decl.StorageClass & SC_TYPEDEF) != SC_TYPEDEF) {
+
+ /* If we have a register variable, try to allocate a register and
+ * convert the declaration to "auto" if this is not possible.
+ */
+ int Reg = 0; /* Initialize to avoid gcc complains */
+ if ((Decl.StorageClass & SC_REGISTER) != 0 &&
+ (Reg = F_AllocRegVar (CurrentFunc, Decl.Type)) < 0) {
+ /* No space for this register variable, convert to auto */
+ Decl.StorageClass = (Decl.StorageClass & ~SC_REGISTER) | SC_AUTO;
+ }
+
+ /* Check the variable type */
+ if ((Decl.StorageClass & SC_REGISTER) == SC_REGISTER) {
+ /* Register variable */
+ SymData = ParseRegisterDecl (&Decl, &Decl.StorageClass, Reg);
+ } else if ((Decl.StorageClass & SC_AUTO) == SC_AUTO) {
+ /* Auto variable */
+ SymData = ParseAutoDecl (&Decl, &Decl.StorageClass);
+ } else if ((Decl.StorageClass & SC_EXTERN) == SC_EXTERN) {
+ /* External identifier - may not get initialized */
+ if (CurTok.Tok == TOK_ASSIGN) {
+ Error ("Cannot initialize externals");
+ }
+ SymData = 0;
+ } else if ((Decl.StorageClass & SC_STATIC) == SC_STATIC) {
+ /* Static variable */
+ SymData = ParseStaticDecl (&Decl, &Decl.StorageClass);
+ } else {
+ Internal ("Invalid storage class in ParseOneDecl: %04X", Decl.StorageClass);
+ }
+ }