Ignore:
Timestamp:
Mar 23, 2023, 12:18:39 PM (13 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, ast-experimental, master
Children:
c94b1f0
Parents:
1afd9ccb (diff), 18ea270 (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/Parser/ExpressionNode.cc

    r1afd9ccb rd800676  
    164164        } else {
    165165                // At least one digit in integer constant, so safe to backup while looking for suffix.
     166                // This declaration and the comma expressions in the conditions mimic
     167                // the declare and check pattern allowed in later compiler versions.
     168                // (Only some early compilers/C++ standards do not support it.)
    166169                string::size_type posn;
    167170                // pointer value
    168                 if ( posn = str.find_last_of( "pP" ); posn != string::npos ) {
     171                if ( posn = str.find_last_of( "pP" ), posn != string::npos ) {
    169172                        ltype = 5; str.erase( posn, 1 );
    170173                // size_t
    171                 } else if ( posn = str.find_last_of( "zZ" ); posn != string::npos ) {
     174                } else if ( posn = str.find_last_of( "zZ" ), posn != string::npos ) {
    172175                        Unsigned = true; type = 2; ltype = 4; str.erase( posn, 1 );
    173176                // signed char
    174                 } else if ( posn = str.rfind( "hh" ); posn != string::npos ) {
     177                } else if ( posn = str.rfind( "hh" ), posn != string::npos ) {
    175178                        type = 1; str.erase( posn, 2 );
    176179                // signed char
    177                 } else if ( posn = str.rfind( "HH" ); posn != string::npos ) {
     180                } else if ( posn = str.rfind( "HH" ), posn != string::npos ) {
    178181                        type = 1; str.erase( posn, 2 );
    179182                // short
    180                 } else if ( posn = str.find_last_of( "hH" ); posn != string::npos ) {
     183                } else if ( posn = str.find_last_of( "hH" ), posn != string::npos ) {
    181184                        type = 0; str.erase( posn, 1 );
    182185                // int (natural number)
    183                 } else if ( posn = str.find_last_of( "nN" ); posn != string::npos ) {
     186                } else if ( posn = str.find_last_of( "nN" ), posn != string::npos ) {
    184187                        type = 2; str.erase( posn, 1 );
    185188                } else if ( str.rfind( "ll" ) != string::npos || str.rfind( "LL" ) != string::npos ) {
Note: See TracChangeset for help on using the changeset viewer.