public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c/4640: unnamed enums inside struct typedef
@ 2001-10-21 12:06 fnf
  0 siblings, 0 replies; only message in thread
From: fnf @ 2001-10-21 12:06 UTC (permalink / raw)
  To: gcc-gnats; +Cc: fnf

>Number:         4640
>Category:       c
>Synopsis:       latest gcc produces new error on previously accepted code
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Sun Oct 21 12:06:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Fred Fish
>Release:        3.1 20011021 (experimental)
>Organization:
>Environment:
System: Linux fishpond.ninemoons.com 2.4.2-2smp #1 SMP Sun Apr 8 20:21:34 EDT 2001 i686 unknown
Architecture: i686

	
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: /src/sourceware/gcc/gcc/configure -v --prefix=/usr/sourceware --enable-shared : (reconfigured)  : (reconfigured) 
>Description:
	The latest development gcc rejects code that was previously accepted.
	It's not clear (at least to me) if this is a bug, or a case of gcc now
	validly rejected code that is in fact noncompliant with the C standard.
>How-To-Repeat:

  $ cat j.c
  typedef struct {
    enum { A, B}; /* values for x */
    int x;
  } z;

  $ which gcc
  /usr/sourceware/bin/gcc

  $ gcc -v
  Reading specs from /usr/sourceware/lib/gcc-lib/i686-pc-linux-gnu/3.1/specs
  Configured with: /src/sourceware/gcc/gcc/configure -v --prefix=/usr/sourceware --enable-shared : (reconfigured)  : (reconfigured)
  Thread model: single
  gcc version 3.1 20011021 (experimental)

  $ gcc -c j.c
  j.c:2: unnamed fields of type other than struct or union are not allowed

  $ /usr/bin/gcc -v
  Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
  gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-81)

  $ /usr/bin/gcc -c j.c
  $

>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-10-21 12:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-21 12:06 c/4640: unnamed enums inside struct typedef fnf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).