This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c++/9623: struct named initializer regression

>Number:         9623
>Category:       c++
>Synopsis:       struct named initializer regression
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Sat Feb 08 00:16:00 UTC 2003
>Originator:     VÁCLAV HAISMAN
>Release:        3.3 20030131 (prerelease)
System: FreeBSD 4.7-STABLE FreeBSD 4.7-STABLE #0: Sun Jan 5 15:41:58 CET 2003 i386

host: i386-unknown-freebsd4.7
build: i386-unknown-freebsd4.7
target: i386-unknown-freebsd4.7
configured with: ../srcdir/configure --prefix=/home/4/wilx --srcdir=/home/4/wilx/tmp/gcc33/srcdir --enable-shared --enable-languages=c,c++,objc,java,f77 --enable-threads=posix --enable-version-specific-runtime-libs --enable-haifa --enable-dwarf2 --with-cpu=i686 --enable-libgcj
	This simple piece of code fails to build with this error using GCC 3.3 or 3.4. 
        It builds without warning using GCC 3.2.

        $ c++ -W -c bug.cxx
        bug.cxx:2: error: too many initializers for `S'
        bug.cxx:2: warning: missing initializer for member `S::y'

        This test case has been derived from Cygwin sources that uses such initializers on many places.
        struct S { int x;  int y; };
        S s = { x:1, y:2 };


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]