Changes in src/Parser/ExpressionNode.cc [d55d7a6:bf4b4cf]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/ExpressionNode.cc
rd55d7a6 rbf4b4cf 10 10 // Created On : Sat May 16 13:17:07 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Sep 27 22:51:55201713 // Update Count : 78 112 // Last Modified On : Tue Sep 26 11:23:36 2017 13 // Update Count : 780 14 14 // 15 15 … … 207 207 208 208 assert( 0 <= size && size < 6 ); 209 // Constant type is correct for overload resolving.210 209 ret = new ConstantExpr( Constant( new BasicType( noQualifiers, kind[Unsigned][size] ), str, v ) ); 211 if ( Unsigned && size < 2 ) {// hh or h, less than int ?210 if ( size < 2 ) { // hh or h, less than int ? 212 211 // int i = -1uh => 65535 not -1, so cast is necessary for unsigned, which unfortunately eliminates warnings for large values. 213 212 ret = new CastExpr( ret, new BasicType( Type::Qualifiers(), kind[Unsigned][size] ) ); … … 356 355 357 356 Expression * build_field_name_FLOATING_FRACTIONconstant( const string & str ) { 358 if ( str.find_first_not_of( "0123456789", 1 ) != string::npos ) throw SemanticError( yylloc,"invalid tuple index " + str );357 if ( str.find_first_not_of( "0123456789", 1 ) != string::npos ) throw SemanticError( "invalid tuple index " + str ); 359 358 Expression * ret = build_constantInteger( *new string( str.substr(1) ) ); 360 359 delete &str; … … 363 362 364 363 Expression * build_field_name_FLOATING_DECIMALconstant( const string & str ) { 365 if ( str[str.size()-1] != '.' ) throw SemanticError( yylloc,"invalid tuple index " + str );364 if ( str[str.size()-1] != '.' ) throw SemanticError( "invalid tuple index " + str ); 366 365 Expression * ret = build_constantInteger( *new string( str.substr( 0, str.size()-1 ) ) ); 367 366 delete &str;
Note:
See TracChangeset
for help on using the changeset viewer.