Changeset 4cb935e for src/SymTab


Ignore:
Timestamp:
Dec 1, 2016, 12:46:34 PM (8 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:
78b3f52
Parents:
148f7290
Message:

0 and 1 now properly parse and resolve to zero_t and one_t respectively

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Autogen.h

    r148f7290 r4cb935e  
    8888                if ( forward ) {
    8989                        // generate: for ( int i = 0; i < 0; ++i )
    90                         begin = new NameExpr( "0" );
     90                        begin = new ConstantExpr( Constant( new ZeroType( emptyQualifiers ), "0" ) );
    9191                        end = array->get_dimension()->clone();
    9292                        cmp = new NameExpr( "?<?" );
     
    9696                        begin = new UntypedExpr( new NameExpr( "?-?" ) );
    9797                        ((UntypedExpr*)begin)->get_args().push_back( array->get_dimension()->clone() );
    98                         ((UntypedExpr*)begin)->get_args().push_back( new NameExpr( "1" ) );
    99                         end = new NameExpr( "0" );
     98                        ((UntypedExpr*)begin)->get_args().push_back( new ConstantExpr( Constant( new OneType( emptyQualifiers ), "1" ) ) );
     99                        end = new ConstantExpr( Constant( new ZeroType( emptyQualifiers ), "0" ) );
    100100                        cmp = new NameExpr( "?>=?" );
    101101                        update = new NameExpr( "--?" );
     
    175175} // namespace SymTab
    176176#endif // AUTOGEN_H
    177 
Note: See TracChangeset for help on using the changeset viewer.