Changeset be9aa0f


Ignore:
Timestamp:
Jan 3, 2018, 10:11:04 AM (4 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
4b97770
Parents:
4e22d7d
Message:

Construct all initialized VLAs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/GenInit.cc

    r4e22d7d rbe9aa0f  
    232232                Type * type = objDecl->get_type();
    233233                while ( ArrayType * at = dynamic_cast< ArrayType * >( type ) ) {
     234                        // must always construct VLAs with an initializer, since this is an error in C
     235                        if ( at->isVarLen && objDecl->init ) return true;
    234236                        type = at->get_base();
    235237                }
Note: See TracChangeset for help on using the changeset viewer.