This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
c/459: C99 new scopes
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c/459: C99 new scopes
- From: Joseph Myers <jsm28 at cam dot ac dot uk>
- Date: Thu, 10 Aug 2000 10:40:24 +0000
- Cc: jsm28 at cam dot ac dot uk
- Resent-Cc: gcc-prs at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org
- Resent-Reply-To: gcc-gnats@gcc.gnu.org, Joseph Myers <jsm28@cam.ac.uk>
>Number: 459
>Category: c
>Synopsis: C99 new scopes
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: unassigned
>State: open
>Class: wrong-code
>Submitter-Id: net
>Arrival-Date: Thu Aug 10 03:46:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: Joseph S. Myers
>Release: 2.96
>Organization:
none
>Environment:
System: Linux decomino 2.2.16 #1 Thu Jun 8 00:26:22 UTC 2000 i686 unknown
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
>Description:
This PR is to track the existence of and reason for an XFAIL.
C99 adds new block scopes for selection and iteration statements. In
C99 mode, these need to be implemented, but not outside of C99 mode
since there is a subtle quiet change involved, as noted in the
Rationale.
These scopes are also needed for the new construction `for (int i = 0;
i < 10; i++)'. If such a construction (when implemented) is
encountered outside C99 mode, it could be a hard error or could (as an
extension) cause the for loop to get the C99 scopes it would not
otherwise get.
These scopes also exist to clarify the lifetime of compound literals;
see the Rationale. I haven't yet examined how GCC's implementation of
compound literals relates to the standard in this respect.
>How-To-Repeat:
See gcc.dg/c99-scope-1.c (presently XFAILing) and compare c90-scope-1.c.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: