29463
2006-10-13 17:54:20 +0000
Value of a static expression of a decimal fixed point type must be a multiple of the small
2015-12-05 11:27:04 +0000
1
1
1
Unclassified
gcc
ada
3.4.5
All
All
NEW
accepts-invalid
P3
minor
---
1
dewi.daniels
unassigned
ebotcazou
gcc-bugs
2006-10-13 21:31:05
oldest_to_newest
180011
0
dewi.daniels
2006-10-13 17:54:20 +0000
gcc Ada does not always check whether the value of a static expression of a decimal fixed point type is a multiple of the small. Aonix ObjectAda rejects the following program with the error message, "test.adb: Error: line 5 col 22 LRM:4.9(36), The value of a static expression of a decimal fixed point type must be a multiple of the small, Continuing"
procedure Test
is
type T is delta 0.1 digits 2;
X : constant := 0.01;
Y : constant T := X;
begin
null;
end Test;
180025
1
laurent
2006-10-13 21:31:05 +0000
Confirmed with gcc version 4.2.0 20060922 (experimental), GCC accepts-invalid here.
Note:
Y : constant T := 0.01;
is correctly rejected with:
test.adb:5:22: value has extraneous low order digits
469469
2
ebotcazou
2015-12-05 11:27:04 +0000
The error is still missing.