Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/DeclarationNode.cc

    r45161b4d r8e9cbb2  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // DeclarationNode.cc -- 
     7// DeclarationNode.cc --
    88//
    99// Author           : Rodolfo G. Esteves
    1010// Created On       : Sat May 16 12:34:05 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Apr 13 16:53:17 2016
    13 // Update Count     : 161
     12// Last Modified On : Thu Jun 30 14:39:51 2016
     13// Update Count     : 163
    1414//
    1515
     
    9797                os << endl << string( indent + 2, ' ' ) << "with initializer ";
    9898                initializer->printOneLine( os );
     99                os << " maybe constructed? " << initializer->get_maybeConstructed();
     100
    99101        } // if
    100102
     
    353355        } // if
    354356}
    355          
     357
    356358DeclarationNode *DeclarationNode::addQualifiers( DeclarationNode *q ) {
    357359        if ( q ) {
     
    504506                assert( false );
    505507        } // switch
    506        
     508
    507509        return this;
    508510}
     
    615617                assert( a->type->kind == TypeData::Array );
    616618                TypeData *lastArray = findLast( a->type );
    617                 if ( type ) { 
     619                if ( type ) {
    618620                        switch ( type->kind ) {
    619621                          case TypeData::Aggregate:
     
    659661        } // if
    660662}
    661        
     663
    662664DeclarationNode *DeclarationNode::addIdList( DeclarationNode *ids ) {
    663665        type = addIdListToType( type, ids );
     
    853855Declaration *DeclarationNode::build() const {
    854856        if ( type ) {
    855                 Declaration *newDecl = type->buildDecl( name, buildStorageClass(), maybeBuild< Expression >( bitfieldWidth ), buildFuncSpecifier( Inline ), buildFuncSpecifier( Noreturn ), linkage, maybeBuild< Initializer >(initializer) );
    856                 return newDecl;
     857                return type->buildDecl( name, buildStorageClass(), maybeBuild< Expression >( bitfieldWidth ), buildFuncSpecifier( Inline ), buildFuncSpecifier( Noreturn ), linkage, maybeBuild< Initializer >(initializer) )->set_extension( extension );
    857858        } // if
    858859        if ( ! buildFuncSpecifier( Inline ) && ! buildFuncSpecifier( Noreturn ) ) {
    859                 return new ObjectDecl( name, buildStorageClass(), linkage, maybeBuild< Expression >( bitfieldWidth ), 0, maybeBuild< Initializer >( initializer ) );
     860                return (new ObjectDecl( name, buildStorageClass(), linkage, maybeBuild< Expression >( bitfieldWidth ), 0, maybeBuild< Initializer >( initializer ) ))->set_extension( extension );
    860861        } // if
    861862        throw SemanticError( "invalid function specifier in declaration of ", this );
     
    864865Type *DeclarationNode::buildType() const {
    865866        assert( type );
    866  
     867
    867868        switch ( type->kind ) {
    868869          case TypeData::Enum:
Note: See TracChangeset for help on using the changeset viewer.