Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • translator/ControlStruct/ForExprMutator.cc

    rc11e31c rd4778a6  
    55namespace ControlStruct {
    66    Statement *ForExprMutator::mutate( ForStmt *forStmt ) {
    7         // recurse down all nest for loops to hoist any initializer declarations to make them C89 (rather than C99)
    87        forStmt->set_body( forStmt->get_body()->acceptMutator( *this ) );
    98        if ( DeclStmt *decl = dynamic_cast< DeclStmt * > ( forStmt->get_initialization() ) ) {
    10             // create compound statement, move initializer declaration outside, leave _for_ as-is
     9            // create compound statement, move declaration outside, leave _for_ as-is
    1110            CompoundStmt *block = new CompoundStmt( std::list< Label >() );
    1211            std::list<Statement *> &stmts = block->get_kids();
     
    1817            return block;
    1918        } // if
    20 
    21         return forStmt;
     19        // ForStmt still needs to be fixed
     20        else
     21            return forStmt;
    2222    }
    2323} // namespace ControlStruct
Note: See TracChangeset for help on using the changeset viewer.