Use given storage class as declared storage class in create_error_declaration().
authorChristoph Mallon <christoph.mallon@gmx.de>
Fri, 12 Sep 2008 20:02:24 +0000 (20:02 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Fri, 12 Sep 2008 20:02:24 +0000 (20:02 +0000)
[r21908]

parser.c

index 89ebf71..ef0cecc 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -3065,10 +3065,10 @@ static declaration_t *create_error_declaration(symbol_t *symbol, storage_class_t
 {
        declaration_t *const decl    = allocate_declaration_zero();
        decl->source_position        = *HERE;
+       decl->declared_storage_class = storage_class;
        decl->storage_class          =
                storage_class != STORAGE_CLASS_NONE || scope == global_scope ?
                        storage_class : STORAGE_CLASS_AUTO;
-       decl->declared_storage_class = decl->storage_class;
        decl->symbol                 = symbol;
        decl->implicit               = true;
        record_declaration(decl);