Commit bcab9cf8 authored by Gábor Szalai's avatar Gábor Szalai
Browse files

Remove leading zero warning from str2float compiler part (bug 566028)



The standard explicitly allow the leading zero for str2float
Leading zero warning is not needed as it is allowed.

C.1.29  Character string to float
str2float(in charstring invalue) return float This function
converts a charstring comprising a number into a float value.
The format of the number in the charstring shall follow rules
in clause 6.1.0, items a) or b) with the following exceptions:

leading zeros are allowed;

EXAMPLE:

str2float("12345.6") // is the same as str2float("123.456E+02")

Change-Id: I0e29260f893874d4b34372cd064882bb51087260
Signed-off-by: Gábor Szalai's avatarGabor Szalai <gabor.szalai@ericsson.com>
parent 06fb83ab
......@@ -6003,8 +6003,6 @@ void Value::chk_expr_operand_execute_refd(Value *v1,
if (c == '.') state = S_FIRST_F;
else if (c == 'E' || c == 'e') state = S_INITIAL_E;
else if (c >= '0' && c <= '9') {
val->warning("Leading zero digit was detected and ignored in the "
"mantissa of the operand of operation `%s'", opname);
state = S_MORE_M;
} else state = S_ERR;
break;
......@@ -6036,8 +6034,6 @@ void Value::chk_expr_operand_execute_refd(Value *v1,
break;
case S_ZERO_E:
if (c >= '0' && c <= '9') {
val->warning("Leading zero digit was detected and ignored in the "
"exponent of the operand of operation `%s'", opname);
state = S_MORE_E;
}
else state = S_ERR;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment