Changeset 4ee3b0c1 for src/Parser


Ignore:
Timestamp:
May 29, 2018, 10:50:03 AM (6 years ago)
Author:
Rob Schluntz <rschlunt@…>
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, with_gc
Children:
71e555c
Parents:
533540a
Message:

Push float80/float128 through the system

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/TypeData.cc

    r533540a r4ee3b0c1  
    575575
    576576          case DeclarationNode::Int128:
    577                 ret = td->signedness == 1 ? BasicType::UnsignedInt128 : BasicType::SignedInt128;
     577                ret = td->signedness == DeclarationNode::Unsigned ? BasicType::UnsignedInt128 : BasicType::SignedInt128;
    578578                if ( td->length != DeclarationNode::NoLength ) {
    579579                        genTSError( DeclarationNode::lengthNames[ td->length ], td->basictype );
     
    599599                        genTSError( DeclarationNode::lengthNames[ td->length ], td->basictype );
    600600                } // if
    601                 if ( td->basictype == DeclarationNode::Float && td->length == DeclarationNode::Long ) {
     601                if ( td->basictype != DeclarationNode::Double && td->length == DeclarationNode::Long ) {
    602602                        genTSError( DeclarationNode::lengthNames[ td->length ], td->basictype );
    603603                } // if
     
    605605                        const_cast<TypeData *>(td)->basictype = DeclarationNode::LongDouble;
    606606                } // if
     607
     608                if ( td->basictype == DeclarationNode::Float80 || td->basictype == DeclarationNode::Float128 ) {
     609                        if ( td->complextype != DeclarationNode::NoComplexType ) {
     610                                genTSError( DeclarationNode::complexTypeNames[ td->complextype ], td->basictype );
     611                        }
     612                        if ( td->basictype == DeclarationNode::Float80 ) ret = BasicType::Float80;
     613                        else ret = BasicType::Float128;
     614                        break;
     615                }
    607616
    608617                ret = floattype[ td->complextype ][ td->basictype - DeclarationNode::Float ];
Note: See TracChangeset for help on using the changeset viewer.