Changeset 356bb95


Ignore:
Timestamp:
Apr 15, 2016, 3:04:48 PM (6 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, ctor, deferred_resn, demangler, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
385c130
Parents:
29ad0ac (diff), 347c42f (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into gc_noraii

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/CastCost.cc

    r29ad0ac r356bb95  
    6969                PointerType *destAsPointer = dynamic_cast< PointerType* >( dest );
    7070                if ( destAsPointer && basicType->isInteger() ) {
    71                         //cost = Cost( 1, 0, 0 );
    72                         cost = Cost::infinity;
     71                        // necessary for, e.g. unsigned long => void*
     72                        cost = Cost( 1, 0, 0 );
    7373                } else {
    7474                        ConversionCost::visit( basicType );
     
    8989                                } else if ( castResult < 0 ) {
    9090                                        cost = Cost::infinity;
    91                                         //cost = Cost( 1, 0, 0 );
    9291                                } // if
    9392                        } // if
    9493                } else if ( BasicType *destAsBasic = dynamic_cast< BasicType* >( dest ) ) {
    9594                        if ( destAsBasic->isInteger() ) {
    96                                 //cost = Cost( 1, 0, 0 );
    97                                 cost = Cost::infinity;
     95                                // necessary for, e.g. void* => unsigned long
     96                                cost = Cost( 1, 0, 0 );
    9897                        } // if
    9998                }
Note: See TracChangeset for help on using the changeset viewer.