Bug 29463 - Value of a static expression of a decimal fixed point type must be a multiple of the small
Summary: Value of a static expression of a decimal fixed point type must be a multiple...
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: ada (show other bugs)
Version: 3.4.5
: P3 minor
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: accepts-invalid
Depends on:
Blocks:
 
Reported: 2006-10-13 17:54 UTC by Dewi Daniels
Modified: 2015-12-05 11:27 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-10-13 21:31:05


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dewi Daniels 2006-10-13 17:54:20 UTC
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;
Comment 1 Laurent GUERBY 2006-10-13 21:31:05 UTC
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
Comment 2 Eric Botcazou 2015-12-05 11:27:04 UTC
The error is still missing.