Ignore:
Timestamp:
Apr 22, 2024, 11:37:36 PM (5 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
13de4478
Parents:
0fe07be (diff), d7c0ad5 (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' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/CommonType.cc

    r0fe07be r15215f02  
    397397                        }
    398398                } else if ( auto type2AsAttr = dynamic_cast< const ast::EnumAttrType * >( type2 ) ) {
    399             if ( type2AsAttr->attr == ast::EnumAttribute::Posn ) {
    400                             ast::BasicKind kind = commonTypes[ basic->kind ][ ast::BasicKind::SignedInt ];
    401                             if (
    402                                     ( ( kind == basic->kind && basic->qualifiers >= type2->qualifiers )
    403                                             || widen.first )
    404                                     && ( ( kind != basic->kind && basic->qualifiers <= type2->qualifiers )
    405                                             || widen.second )
    406                             ) {
    407                                     result = new ast::BasicType{ kind, basic->qualifiers | type2->qualifiers };
    408                             }
    409             }
     399                        if ( type2AsAttr->attr == ast::EnumAttribute::Posn ) {
     400                                ast::BasicKind kind = commonTypes[ basic->kind ][ ast::BasicKind::SignedInt ];
     401                                if (
     402                                        ( ( kind == basic->kind && basic->qualifiers >= type2->qualifiers )
     403                                                || widen.first )
     404                                        && ( ( kind != basic->kind && basic->qualifiers <= type2->qualifiers )
     405                                                || widen.second )
     406                                ) {
     407                                        result = new ast::BasicType{ kind, basic->qualifiers | type2->qualifiers };
     408                                }
     409                        }
    410410                }
    411411        }
     
    519519                                                                // xxx - assume LHS is always the target type
    520520
    521                                                                 if ( ! ((widen.second && ref2->qualifiers.is_mutex) 
     521                                                                if ( ! ((widen.second && ref2->qualifiers.is_mutex)
    522522                                                                || (ref1->qualifiers.is_mutex == ref2->qualifiers.is_mutex ))) return;
    523523
Note: See TracChangeset for help on using the changeset viewer.