Changeset 4da6a6c


Ignore:
Timestamp:
Mar 14, 2017, 3:14:56 PM (7 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
2f26687a, 3831b58, e61a35e
Parents:
026bb82 (diff), 08d5507b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
src
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.cc

    r026bb82 r4da6a6c  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Mar  5 17:13:33 2017
    13 // Update Count     : 475
     12// Last Modified On : Mon Mar 13 23:56:59 2017
     13// Update Count     : 477
    1414//
    1515
     
    895895
    896896        void CodeGenerator::handleStorageClass( DeclarationWithType * decl ) {
    897                 if ( decl->get_storageClasses().any() ) {
     897                if ( decl->get_storageClasses().val != 0 ) {
    898898                        DeclarationNode::print_StorageClass( output, decl->get_storageClasses() );
    899899                } // if
  • src/GenPoly/Box.cc

    r026bb82 r4da6a6c  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Mar  6 23:45:59 2017
    13 // Update Count     : 330
     12// Last Modified On : Tue Mar 14 07:45:29 2017
     13// Update Count     : 334
    1414//
    1515
     
    299299                // because each unit generates copies of the default routines for each aggregate.
    300300                FunctionDecl *layoutDecl = new FunctionDecl( layoutofName( typeDecl ),
    301                                                                                                          functionNesting > 0 ? DeclarationNode::StorageClasses() : DeclarationNode::StorageClasses( DeclarationNode::StaticClass ),
     301                                                                                                         functionNesting > 0 ? DeclarationNode::StorageClasses() : DeclarationNode::StorageClasses( DeclarationNode::Static ),
    302302                                                                                                         LinkageSpec::AutoGen, layoutFnType, new CompoundStmt( noLabels ),
    303                                                                                                          std::list< Attribute * >(), DeclarationNode::FuncSpecifiers( DeclarationNode::InlineSpec ) );
     303                                                                                                         std::list< Attribute * >(), DeclarationNode::FuncSpecifiers( DeclarationNode::Inline ) );
    304304                layoutDecl->fixUniqueId();
    305305                return layoutDecl;
  • src/InitTweak/FixGlobalInit.cc

    r026bb82 r4da6a6c  
    1010// Created On       : Mon May 04 15:14:56 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Mar  6 23:14:19 2017
    13 // Update Count     : 14
     12// Last Modified On : Mon Mar 13 23:58:27 2017
     13// Update Count     : 16
    1414//
    1515
     
    8787                        dtorParameters.push_back( new ConstantExpr( Constant::from_int( 102 ) ) );
    8888                }
    89                 initFunction = new FunctionDecl( "_init_" + fixedName, DeclarationNode::StorageClasses( DeclarationNode::StaticClass ), LinkageSpec::C, new FunctionType( Type::Qualifiers(), false ), new CompoundStmt( noLabels ) );
     89                initFunction = new FunctionDecl( "_init_" + fixedName, DeclarationNode::StorageClasses( DeclarationNode::Static ), LinkageSpec::C, new FunctionType( Type::Qualifiers(), false ), new CompoundStmt( noLabels ) );
    9090                initFunction->get_attributes().push_back( new Attribute( "constructor", ctorParameters ) );
    91                 destroyFunction = new FunctionDecl( "_destroy_" + fixedName, DeclarationNode::StorageClasses( DeclarationNode::StaticClass ), LinkageSpec::C, new FunctionType( Type::Qualifiers(), false ), new CompoundStmt( noLabels ) );
     91                destroyFunction = new FunctionDecl( "_destroy_" + fixedName, DeclarationNode::StorageClasses( DeclarationNode::Static ), LinkageSpec::C, new FunctionType( Type::Qualifiers(), false ), new CompoundStmt( noLabels ) );
    9292                destroyFunction->get_attributes().push_back( new Attribute( "destructor", dtorParameters ) );
    9393        }
     
    143143// compile-command: "make install" //
    144144// End: //
    145 
  • src/InitTweak/FixInit.cc

    r026bb82 r4da6a6c  
    1010// Created On       : Wed Jan 13 16:29:30 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Mar  7 07:51:40 2017
    13 // Update Count     : 59
     12// Last Modified On : Tue Mar 14 08:05:28 2017
     13// Update Count     : 63
    1414//
    1515
     
    678678                                assert( ! ctorInit->get_ctor() || ! ctorInit->get_init() );
    679679                                if ( Statement * ctor = ctorInit->get_ctor() ) {
    680                                         if ( objDecl->get_storageClasses()[ DeclarationNode::Static ] ) {
     680                                        if ( objDecl->get_storageClasses().is_static ) {
    681681                                                // originally wanted to take advantage of gcc nested functions, but
    682682                                                // we get memory errors with this approach. To remedy this, the static
     
    704704                                                BasicType * boolType = new BasicType( Type::Qualifiers(), BasicType::Bool );
    705705                                                SingleInit * boolInitExpr = new SingleInit( new ConstantExpr( Constant( boolType->clone(), "1" ) ), noDesignators );
    706                                                 ObjectDecl * isUninitializedVar = new ObjectDecl( objDecl->get_mangleName() + "_uninitialized", DeclarationNode::StorageClasses( DeclarationNode::StaticClass ), LinkageSpec::Cforall, 0, boolType, boolInitExpr );
     706                                                ObjectDecl * isUninitializedVar = new ObjectDecl( objDecl->get_mangleName() + "_uninitialized", DeclarationNode::StorageClasses( DeclarationNode::Static ), LinkageSpec::Cforall, 0, boolType, boolInitExpr );
    707707                                                isUninitializedVar->fixUniqueId();
    708708
     
    731731
    732732                                                        // void __objName_dtor_atexitN(...) {...}
    733                                                         FunctionDecl * dtorCaller = new FunctionDecl( objDecl->get_mangleName() + dtorCallerNamer.newName(), DeclarationNode::StorageClasses( DeclarationNode::StaticClass ), LinkageSpec::C, new FunctionType( Type::Qualifiers(), false ), new CompoundStmt( noLabels ) );
     733                                                        FunctionDecl * dtorCaller = new FunctionDecl( objDecl->get_mangleName() + dtorCallerNamer.newName(), DeclarationNode::StorageClasses( DeclarationNode::Static ), LinkageSpec::C, new FunctionType( Type::Qualifiers(), false ), new CompoundStmt( noLabels ) );
    734734                                                        dtorCaller->fixUniqueId();
    735735                                                        dtorCaller->get_statements()->push_back( dtorStmt );
     
    764764                                                        // create a new object which is never used
    765765                                                        static UniqueName dummyNamer( "_dummy" );
    766                                                         ObjectDecl * dummy = new ObjectDecl( dummyNamer.newName(), DeclarationNode::StorageClasses( DeclarationNode::StaticClass ), LinkageSpec::Cforall, 0, new PointerType( Type::Qualifiers(), new VoidType( Type::Qualifiers() ) ), 0, std::list< Attribute * >{ new Attribute("unused") } );
     766                                                        ObjectDecl * dummy = new ObjectDecl( dummyNamer.newName(), DeclarationNode::StorageClasses( DeclarationNode::Static ), LinkageSpec::Cforall, 0, new PointerType( Type::Qualifiers(), new VoidType( Type::Qualifiers() ) ), 0, std::list< Attribute * >{ new Attribute("unused") } );
    767767                                                        return dummy;
    768768                                                }
     
    821821                void InsertDtors::visit( ObjectDecl * objDecl ) {
    822822                        // remember non-static destructed objects so that their destructors can be inserted later
    823                         if ( ! objDecl->get_storageClasses()[ DeclarationNode::Static ] ) {
     823                        if ( ! objDecl->get_storageClasses().is_static ) {
    824824                                if ( ConstructorInit * ctorInit = dynamic_cast< ConstructorInit * >( objDecl->get_init() ) ) {
    825825                                        // a decision should have been made by the resolver, so ctor and init are not both non-NULL
  • src/InitTweak/GenInit.cc

    r026bb82 r4da6a6c  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Mar  7 07:51:38 2017
    13 // Update Count     : 179
     12// Last Modified On : Mon Mar 13 23:59:09 2017
     13// Update Count     : 180
    1414//
    1515
     
    186186                // C doesn't allow variable sized arrays at global scope or for static variables, so don't hoist dimension.
    187187                if ( ! inFunction ) return;
    188                 if ( storageClasses[ DeclarationNode::StaticClass] ) return;
     188                if ( storageClasses.is_static ) return;
    189189
    190190                if ( ArrayType * arrayType = dynamic_cast< ArrayType * >( type ) ) {
  • src/InitTweak/InitTweak.cc

    r026bb82 r4da6a6c  
    260260                        (objDecl->get_init() == NULL ||
    261261                                ( objDecl->get_init() != NULL && objDecl->get_init()->get_maybeConstructed() ))
    262                         && ! objDecl->get_storageClasses()[ DeclarationNode::Extern ];
     262                        && ! objDecl->get_storageClasses().is_extern;
    263263        }
    264264
  • src/Parser/DeclarationNode.cc

    r026bb82 r4da6a6c  
    1010// Created On       : Sat May 16 12:34:05 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Mar  7 17:28:56 2017
    13 // Update Count     : 937
     12// Last Modified On : Tue Mar 14 10:19:38 2017
     13// Update Count     : 964
    1414//
    1515
     
    9090        newnode->type = maybeClone( type );
    9191        newnode->storageClasses = storageClasses;
     92        newnode->funcSpecs = funcSpecs;
    9293        newnode->bitfieldWidth = maybeClone( bitfieldWidth );
    93         newnode->funcSpecs = funcSpecs;
    9494        newnode->enumeratorValue.reset( maybeClone( enumeratorValue.get() ) );
    9595        newnode->hasEllipsis = hasEllipsis;
     
    117117
    118118void DeclarationNode::print_StorageClass( std::ostream & output, StorageClasses storageClasses ) {
    119         if ( storageClasses.any() ) {                                                           // function specifiers?
     119        if ( storageClasses.val != 0 ) {                                        // storage classes ?
    120120                for ( unsigned int i = 0; i < DeclarationNode::NoStorageClass; i += 1 ) {
    121121                        if ( storageClasses[i] ) {
     
    127127
    128128void DeclarationNode::print_FuncSpec( std::ostream & output, DeclarationNode::FuncSpecifiers funcSpec ) {
    129         if ( funcSpec.any() ) {                                                         // function specifiers?
     129        if ( funcSpec.val != 0 ) {                                                      // function specifiers ?
    130130                for ( unsigned int i = 0; i < DeclarationNode::NoFuncSpecifier; i += 1 ) {
    131131                        if ( funcSpec[i] ) {
     
    202202
    203203
    204 DeclarationNode * DeclarationNode::newStorageClass( DeclarationNode::StorageClass sc ) {
    205         DeclarationNode * newnode = new DeclarationNode;
    206         newnode->storageClasses[ sc ] = true;
     204DeclarationNode * DeclarationNode::newStorageClass( DeclarationNode::StorageClasses sc ) {
     205        DeclarationNode * newnode = new DeclarationNode;
     206        newnode->storageClasses = sc;
    207207        return newnode;
    208208} // DeclarationNode::newStorageClass
    209209
    210 DeclarationNode * DeclarationNode::newFuncSpecifier( DeclarationNode::FuncSpecifier fs ) {
    211         DeclarationNode * newnode = new DeclarationNode;
    212         newnode->funcSpecs[ fs ] = true;
     210DeclarationNode * DeclarationNode::newFuncSpecifier( DeclarationNode::FuncSpecifiers fs ) {
     211        DeclarationNode * newnode = new DeclarationNode;
     212        newnode->funcSpecs = fs;
    213213        return newnode;
    214214} // DeclarationNode::newFuncSpecifier
     
    459459        const TypeData::TypeQualifiers qsrc = src->typeQualifiers, qdst = dst->typeQualifiers; // optimization
    460460
    461         if ( (qsrc & qdst).any() ) {                                            // common qualifier ?
    462                 for ( unsigned int i = 0; i < NoTypeQualifier; i += 1 ) { // find common qualifiers
     461        if ( (qsrc & qdst).any() ) {                                            // duplicates ?
     462                for ( unsigned int i = 0; i < NoTypeQualifier; i += 1 ) { // find duplicates
    463463                        if ( qsrc[i] && qdst[i] ) {
    464464                                appendError( error, string( "duplicate " ) + DeclarationNode::typeQualifierNames[i] );
     
    469469
    470470void DeclarationNode::checkSpecifiers( DeclarationNode * src ) {
    471         if ( (funcSpecs & src->funcSpecs).any() ) {                     // common specifier ?
    472                 for ( unsigned int i = 0; i < NoFuncSpecifier; i += 1 ) { // find common specifier
     471        if ( (funcSpecs.val & src->funcSpecs.val) != 0 ) {                // duplicates ?
     472                for ( unsigned int i = 0; i < NoFuncSpecifier; i += 1 ) { // find duplicates
    473473                        if ( funcSpecs[i] && src->funcSpecs[i] ) {
    474474                                appendError( error, string( "duplicate " ) + DeclarationNode::funcSpecifierNames[i] );
     
    477477        } // if
    478478
    479         if ( storageClasses != 0 && src->storageClasses != 0 ) { // any reason to check ?
    480                 if ( (storageClasses & src->storageClasses).any() ) { // duplicates ?
     479        if ( storageClasses.val != 0 && src->storageClasses.val != 0 ) { // any reason to check ?
     480                if ( (storageClasses.val & src->storageClasses.val ) != 0 ) { // duplicates ?
    481481                        for ( unsigned int i = 0; i < NoStorageClass; i += 1 ) { // find duplicates
    482482                                if ( storageClasses[i] && src->storageClasses[i] ) {
     
    485485                        } // for
    486486                        // src is the new item being added and has a single bit
    487                 } else if ( ! src->storageClasses[ Threadlocal ] ) { // conflict ?
    488                         appendError( error, string( "conflicting " ) + storageClassNames[ffs( storageClasses.to_ulong() ) - 1] +
    489                                                  " & " + storageClassNames[ffs( src->storageClasses.to_ulong() ) - 1] );
    490                         src->storageClasses.reset();                            // FIX to preserve invariant of one basic storage specifier
     487                } else if ( ! src->storageClasses.is_threadlocal ) { // conflict ?
     488                        appendError( error, string( "conflicting " ) + storageClassNames[ffs( storageClasses.val ) - 1] +
     489                                                 " & " + storageClassNames[ffs( src->storageClasses.val ) - 1] );
     490                        src->storageClasses.val = 0;                            // FIX to preserve invariant of one basic storage specifier
    491491                } // if
    492492        } // if
     
    496496
    497497DeclarationNode * DeclarationNode::copySpecifiers( DeclarationNode * q ) {
    498         funcSpecs = funcSpecs | q->funcSpecs;
    499         storageClasses = storageClasses | q->storageClasses;
     498        funcSpecs.val = funcSpecs.val | q->funcSpecs.val;
     499        storageClasses.val = storageClasses.val | q->storageClasses.val;
    500500
    501501        for ( Attribute *attr: reverseIterate( q->attributes ) ) {
     
    10581058                //    inline _Noreturn int g( int i );  // allowed
    10591059                //    inline _Noreturn int i;                   // disallowed
    1060                 if ( type->kind != TypeData::Function && funcSpecs.any() ) {
     1060                if ( type->kind != TypeData::Function && funcSpecs.val != 0 ) {
    10611061                        throw SemanticError( "invalid function specifier for ", this );
    10621062                } // if
     
    10681068        //    inlne _Noreturn struct S { ... };         // disallowed
    10691069        //    inlne _Noreturn enum   E { ... };         // disallowed
    1070         if ( funcSpecs.any() ) {
     1070        if ( funcSpecs.val != 0 ) {
    10711071                throw SemanticError( "invalid function specifier for ", this );
    10721072        } // if
  • src/Parser/ParseNode.h

    r026bb82 r4da6a6c  
    1010// Created On       : Sat May 16 13:28:16 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Mar  7 08:10:53 2017
    13 // Update Count     : 726
     12// Last Modified On : Tue Mar 14 11:05:05 2017
     13// Update Count     : 752
    1414//
    1515
     
    204204        // These must remain in the same order as the corresponding DeclarationNode names.
    205205
    206         enum StorageClass { Extern, Static, Auto, Register, Threadlocal, NoStorageClass,
    207                                                 ExternClass = 1 << Extern, StaticClass = 1 << Static, AutoClass = 1 << Auto, RegisterClass = 1 << Register, ThreadlocalClass = 1 << Threadlocal };
    208         enum FuncSpecifier { Inline, Noreturn, Fortran, NoFuncSpecifier,
    209                                                  InlineSpec = 1 << Inline, NoreturnSpec = 1 << Noreturn, FortranSpec = 1 << Fortran };
     206        enum { Extern = 1 << 0, Static = 1 << 1, Auto = 1 << 2, Register = 1 << 3, Threadlocal = 1 << 4, NoStorageClass = 5 };
     207        union StorageClasses {
     208                unsigned int val;
     209                struct {
     210                        bool is_extern : 1;
     211                        bool is_static : 1;
     212                        bool is_auto : 1;
     213                        bool is_register : 1;
     214                        bool is_threadlocal : 1;
     215                };
     216                StorageClasses() : val( 0 ) {}
     217                StorageClasses( unsigned int val ) : val( val ) {}
     218                bool operator[]( unsigned int i ) const { return val & (1 << i); }
     219        }; // StorageClasses
     220
     221        enum { Inline = 1 << 0, Noreturn = 1 << 1, Fortran = 1 << 2, NoFuncSpecifier = 3 };
     222        union FuncSpecifiers {
     223                unsigned int val;
     224                struct {
     225                        bool is_inline : 1;
     226                        bool is_noreturn : 1;
     227                        bool is_fortran : 1;
     228                };
     229                FuncSpecifiers() : val( 0 ) {}
     230                FuncSpecifiers( unsigned int val ) : val( val ) {}
     231                bool operator[]( unsigned int i ) const { return val & (1 << i); }
     232        }; // FuncSpecifiers
     233
    210234        enum TypeQualifier { Const, Restrict, Volatile, Lvalue, Mutex, Atomic, NoTypeQualifier };
    211235        enum BasicType { Void, Bool, Char, Int, Float, Double, LongDouble, NoBasicType };
     
    228252        static const char * builtinTypeNames[];
    229253
    230         static DeclarationNode * newStorageClass( StorageClass );
    231         static DeclarationNode * newFuncSpecifier( FuncSpecifier );
     254        static DeclarationNode * newStorageClass( StorageClasses );
     255        static DeclarationNode * newFuncSpecifier( FuncSpecifiers );
    232256        static DeclarationNode * newTypeQualifier( TypeQualifier );
    233257        static DeclarationNode * newBasicType( BasicType );
     
    326350        TypeData * type;
    327351
    328         typedef std::bitset< DeclarationNode::NoStorageClass > StorageClasses;
    329352        StorageClasses storageClasses;
    330353        static void print_StorageClass( std::ostream & output, StorageClasses storageClasses );
    331354
    332         typedef std::bitset< DeclarationNode::NoFuncSpecifier > FuncSpecifiers;
    333355        FuncSpecifiers funcSpecs;
    334356        static void print_FuncSpec( std::ostream & output, FuncSpecifiers funcSpecs );
  • src/SymTab/Autogen.cc

    r026bb82 r4da6a6c  
    1010// Created On       : Thu Mar 03 15:45:56 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Mar  7 07:42:44 2017
    13 // Update Count     : 51
     12// Last Modified On : Tue Mar 14 07:45:00 2017
     13// Update Count     : 54
    1414//
    1515
     
    162162                // because each unit generates copies of the default routines for each aggregate.
    163163//              DeclarationNode::StorageClass sc = functionNesting > 0 ? DeclarationNode::NoStorageClass : DeclarationNode::Static;
    164                 DeclarationNode::StorageClasses scs = functionNesting > 0 ? DeclarationNode::StorageClasses() : DeclarationNode::StorageClasses( DeclarationNode::StaticClass );
     164                DeclarationNode::StorageClasses scs = functionNesting > 0 ? DeclarationNode::StorageClasses() : DeclarationNode::StorageClasses( DeclarationNode::Static );
    165165                LinkageSpec::Spec spec = isIntrinsic ? LinkageSpec::Intrinsic : LinkageSpec::AutoGen;
    166166                FunctionDecl * decl = new FunctionDecl( fname, scs, spec, ftype, new CompoundStmt( noLabels ),
    167                                                                                                 std::list< Attribute * >(), DeclarationNode::FuncSpecifiers( DeclarationNode::InlineSpec ) );
     167                                                                                                std::list< Attribute * >(), DeclarationNode::FuncSpecifiers( DeclarationNode::Inline ) );
    168168                decl->fixUniqueId();
    169169                return decl;
     
    720720                                        TypeInstType * inst = new TypeInstType( Type::Qualifiers(), newDecl->get_name(), newDecl );
    721721                                        newDecl->get_assertions().push_back( new FunctionDecl( "?=?", DeclarationNode::StorageClasses(), LinkageSpec::Cforall, genAssignType( inst ), nullptr,
    722                                                                                                                                                    std::list< Attribute * >(), DeclarationNode::FuncSpecifiers( DeclarationNode::InlineSpec ) ) );
     722                                                                                                                                                   std::list< Attribute * >(), DeclarationNode::FuncSpecifiers( DeclarationNode::Inline ) ) );
    723723                                        newDecl->get_assertions().push_back( new FunctionDecl( "?{}", DeclarationNode::StorageClasses(), LinkageSpec::Cforall, genDefaultType( inst ), nullptr,
    724                                                                                                                                                    std::list< Attribute * >(), DeclarationNode::FuncSpecifiers( DeclarationNode::InlineSpec ) ) );
     724                                                                                                                                                   std::list< Attribute * >(), DeclarationNode::FuncSpecifiers( DeclarationNode::Inline ) ) );
    725725                                        newDecl->get_assertions().push_back( new FunctionDecl( "?{}", DeclarationNode::StorageClasses(), LinkageSpec::Cforall, genCopyType( inst ), nullptr,
    726                                                                                                                                                    std::list< Attribute * >(), DeclarationNode::FuncSpecifiers( DeclarationNode::InlineSpec ) ) );
     726                                                                                                                                                   std::list< Attribute * >(), DeclarationNode::FuncSpecifiers( DeclarationNode::Inline ) ) );
    727727                                        newDecl->get_assertions().push_back( new FunctionDecl( "^?{}", DeclarationNode::StorageClasses(), LinkageSpec::Cforall, genDefaultType( inst ), nullptr,
    728                                                                                                                                                    std::list< Attribute * >(), DeclarationNode::FuncSpecifiers( DeclarationNode::InlineSpec ) ) );
     728                                                                                                                                                   std::list< Attribute * >(), DeclarationNode::FuncSpecifiers( DeclarationNode::Inline ) ) );
    729729                                        typeParams.push_back( newDecl );
    730730                                        done.insert( ty->get_baseType() );
  • src/SymTab/Indexer.cc

    r026bb82 r4da6a6c  
    1010// Created On       : Sun May 17 21:37:33 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Mar  7 07:45:32 2017
    13 // Update Count     : 16
     12// Last Modified On : Tue Mar 14 08:07:34 2017
     13// Update Count     : 17
    1414//
    1515
     
    738738                                ObjectDecl *newobj = dynamic_cast< ObjectDecl* >( added );
    739739                                ObjectDecl *oldobj = dynamic_cast< ObjectDecl* >( existing );
    740                                 if ( ! newobj->get_storageClasses()[ DeclarationNode::Extern ] && ! oldobj->get_storageClasses()[ DeclarationNode::Extern ] ) {
     740                                if ( ! newobj->get_storageClasses().is_extern && ! oldobj->get_storageClasses().is_extern ) {
    741741                                        throw SemanticError( "duplicate object definition for ", added );
    742742                                } // if
Note: See TracChangeset for help on using the changeset viewer.