|
@@ -1260,7 +1260,7 @@ implementation
|
|
|
The implicit conversion is avoided for enums because implicit conversion between
|
|
|
longint (which is what fpc_val_enum_shortstr returns) and enumerations is not
|
|
|
possible. (DM).
|
|
|
-
|
|
|
+
|
|
|
The implicit conversion is also avoided for COMP type if it is handled by FPU (x86)
|
|
|
to prevent warning about automatic type conversion. }
|
|
|
if (destpara.resultdef.typ=enumdef) or
|
|
@@ -1374,8 +1374,7 @@ implementation
|
|
|
function handle_ln_const(r : bestreal) : tnode;
|
|
|
begin
|
|
|
if r<=0.0 then
|
|
|
- if (cs_check_range in current_settings.localswitches) or
|
|
|
- (cs_check_overflow in current_settings.localswitches) then
|
|
|
+ if floating_point_range_check_error then
|
|
|
begin
|
|
|
result:=crealconstnode.create(0,pbestrealtype^);
|
|
|
CGMessage(type_e_wrong_math_argument)
|
|
@@ -1395,8 +1394,7 @@ implementation
|
|
|
function handle_sqrt_const(r : bestreal) : tnode;
|
|
|
begin
|
|
|
if r<0.0 then
|
|
|
- if (cs_check_range in current_settings.localswitches) or
|
|
|
- (cs_check_overflow in current_settings.localswitches) then
|
|
|
+ if floating_point_range_check_error then
|
|
|
begin
|
|
|
result:=crealconstnode.create(0,pbestrealtype^);
|
|
|
CGMessage(type_e_wrong_math_argument)
|
|
@@ -1636,7 +1634,7 @@ implementation
|
|
|
begin
|
|
|
{ only perform range checking if the result is an enum }
|
|
|
checkrange:=(resultdef.typ=enumdef);
|
|
|
-
|
|
|
+
|
|
|
if (left.nodetype=ordconstn) then
|
|
|
begin
|
|
|
if (inlinenumber=in_succ_x) then
|
|
@@ -1689,8 +1687,7 @@ implementation
|
|
|
begin
|
|
|
result:=crealconstnode.create(exp(getconstrealvalue),pbestrealtype^);
|
|
|
if (trealconstnode(result).value_real=MathInf.Value) and
|
|
|
- ((cs_check_range in current_settings.localswitches) or
|
|
|
- (cs_check_overflow in current_settings.localswitches)) then
|
|
|
+ floating_point_range_check_error then
|
|
|
begin
|
|
|
result:=crealconstnode.create(0,pbestrealtype^);
|
|
|
CGMessage(parser_e_range_check_error);
|