Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/Resolver.cc

    r52f85e0 r3cfe27f  
    1010// Created On       : Sun May 17 12:17:01 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Feb  9 21:57:52 2016
    13 // Update Count     : 179
     12// Last Modified On : Thu Mar 24 16:43:11 2016
     13// Update Count     : 181
    1414//
    1515
     
    165165                Type *new_type = resolveTypeof( objectDecl->get_type(), *this );
    166166                objectDecl->set_type( new_type );
     167                // To handle initialization of routine pointers, e.g., int (*fp)(int) = foo(), means that class-variable
     168                // initContext is changed multiple time because the LHS is analysed twice. The second analysis changes
     169                // initContext because of a function type can contain object declarations in the return and parameter types. So
     170                // each value of initContext is retained, so the type on the first analysis is preserved and used for selecting
     171                // the RHS.
     172                Type *temp = initContext;
    167173                initContext = new_type;
    168174                SymTab::Indexer::visit( objectDecl );
     175                initContext = temp;
    169176        }
    170177
Note: See TracChangeset for help on using the changeset viewer.