This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
ada/4478: Scope of use_package_clause is wrong
- To: gcc-gnats at gcc dot gnu dot org
- Subject: ada/4478: Scope of use_package_clause is wrong
- From: fw at deneb dot enyo dot de
- Date: Fri, 05 Oct 2001 14:43:30 +0200
>Number: 4478
>Category: ada
>Synopsis: Scope of use_package_clause is wrong
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: unassigned
>State: open
>Class: accepts-illegal
>Submitter-Id: net
>Arrival-Date: Fri Oct 05 05:26:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Florian Weimer
>Release: 3.1 20011003 (experimental)
>Organization:
>Environment:
System: Linux deneb 2.4.7 #3 Sat Jul 21 09:35:45 CEST 2001 i686 unknown
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../configure --prefix=/opt/gcc-3
>Description:
With GNAT, the scope of a use_package_clause in a context_clause
incorrectly begins just after the use_package_clause, in contradiction
to RM 8.4(6). As a consequence, GNAT compiles the illegal spec of
package P3 below. (This problem was reported by Stephen Cole in
<9pk4t7$tbm$1@trog.dera.gov.uk>.)
>How-To-Repeat:
Run the following code through gnatchop, and try to compile p3.ads.
Compilation should fail, but it doesn't.
--STX
package P1 is pragma Pure; end;
package P1.P2 is pragma Pure; end;
with P1.P2; use P1; use P2;
package P3 is pragma Pure; end;
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: