compiler/libec: Fixed a bug where ProcessType would fail on parsing [union typename...
authorJerome St-Louis <jerome@ecere.com>
Wed, 15 Feb 2012 08:05:23 +0000 (15:05 +0700)
committerJerome St-Louis <jerome@ecere.com>
Wed, 15 Feb 2012 08:05:23 +0000 (15:05 +0700)
compiler/libec/src/ast.ec

index 9db7cdd..44a552e 100644 (file)
@@ -2007,7 +2007,7 @@ public Type ProcessType(OldList specs, Declarator decl)
                   specType.keepCast = true;
                }
 
-               if(specType.kind == structType || specType.kind == unionType)
+               if(spec.specifier != CONST && (specType.kind == structType || specType.kind == unionType))
                {
                   FreeType(specType);
                   specType = { kind = intType, isSigned = true, refCount = 1 };