[Bug ada/42410] New: Illegal Ada 83 program accepted, universal_integer literal where Character expected
ludovic at ludovic-brenta dot org
gcc-bugzilla@gcc.gnu.org
Thu Dec 17 19:40:00 GMT 2009
pragma ada_83;
with text_io;
procedure test1 is
type T1 is record
str: string(1..10);
end record;
x1: T1 := (str => (others => 49)); --ERROR: 49 is not a character
begin
text_io.put_line(x1.str);
end test1;
$ gnatmake test1; ./test1
gcc-4.3 -c test1.adb
gnatbind -x test1.ali
gnatlink test1.ali
1111111111
$ gnatmake test1
gcc-4.4 -c test1.adb
test1.adb:9:33: expected type "Standard.Character"
test1.adb:9:33: found type universal integer
gnatmake: "test1.adb" compilation error
--
Summary: Illegal Ada 83 program accepted, universal_integer
literal where Character expected
Product: gcc
Version: 4.3.4
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ludovic at ludovic-brenta dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42410
More information about the Gcc-bugs
mailing list