This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/16098] New: Illegal program not detected, RM 13.1(6)
- From: "ludovic dot brenta at insalien dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Jun 2004 11:32:19 -0000
- Subject: [Bug ada/16098] New: Illegal program not detected, RM 13.1(6)
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
-- Pragma convention is a representation pragma (RM B.1(28)), and
-- such pragmas apply to multiple entities with the same name (RM
-- 13.1(5)). A representation pragma is illegal if applied to a
-- non-local renamed entity (RM 13.1(6)).
package Test_248683 is
procedure p1(x: integer);
end Test_248683;
with Test_248683;
package pak2 is
procedure p2(x: integer) renames Test_248683.p1;
procedure p2(x: float);
pragma convention(C, p2); --ERROR: applied to non-local renames
end pak2;
I expect:
test_248683.adb:13:04: representation pragma applied to non-local subprogram
"p2" declared at line 3
Instead I get:
cannot generate code for file test_248683.ads (package spec)
to check package spec for errors, use -gnatc
gnatmake: "test_248683.ads" compilation error
With -c -gnatc I get nothing.
--
Summary: Illegal program not detected, RM 13.1(6)
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ludovic dot brenta at insalien dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16098