bug 3626 is marked as "Not a bug". This is wrong! The comment is also wrong!
-
BR.

Mailing lists / fpc-devel / 2005-02
10 messages · 7 people · –
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
bug 3626 is marked as "Not a bug". This is wrong! The comment is also wrong!
-
BR.
bug 3626 is marked as "Not a bug". This is wrong! The comment is also wrong!
Why? 90000000000000000 is a valid int64...
Vincent.
int64 integer ???
int64 integer ???
The compiler reports a range check error depending on $R as warning or error. So where is the problem? What do you expect to happen?
int64 integer ???
int64 integer ???
They are assignment-compatible. If the value doesn't fit in the range of the destination type, you get either a warning (if range checking is off) or an error (if range checking is on).
Jonas
The compiler reports a range check error depending on $R as warning or error. So where is…
I expect a "out of bounds error" messeage. Independent from $R.
The compiler reports a range check error depending on $R as warning or error. So where is…
im not going to argue whether this is right or wrong but in delphi at least $R only affects run time range checking. In delphi that code will give an error (constant expression violates subrange bounds) even with range checking off.
If I got it right the question is about a comparison statement of two integer numbers. IMHO from the logocal view this should not produce a compiler error or a runtime error as you can compare any two numbers even if the underlying data types are not the same. Logically it's OK to check if 600000000000000 3. So the production of range check errors (runtime or compiletime) is IMHO logically wrong. Warnings are OK as it may be an unintentional error but if the compiler compiles
int64 integer
as
int64temp := integer;
int64 int64tempit would be just the intended behaviuor in any 'normal' situation I can imagine.
Have a nice day,
im not going to argue whether this is right or wrong but in delphi at least $R only…
can agree.
I think this is a special case with for-loops. Delphi also doesn't allow the loop-variable to be int64. I'll add a check to test for the 32bit range. Ofcourse this is a 32bit target only issue. The code is legal on 64bit targets.