This is the mail archive of the gcc-bugs@gcc.gnu.org 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]

[Bug c/12033] New: double initialisation of struct fieds regression


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12033

           Summary: double initialisation of struct fieds regression
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: etienne dot lorrain at masroudeau dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686/Linux/debian
  GCC host triplet: i686/Linux/debian
GCC target triplet: i686/Linux/debian

Error correctly displayed by 2.95.3, no error/warning using 3.3.1:

 On a standard PC i686/debian:

etienne@fulbert:~/projet/gujin$ cat > test.c
const struct { unsigned a,b; } str = { .a=3, .a=5 };

etienne@fulbert:~/projet/gujin$ /home/etienne/projet/toolchain/bin/gcc -v
Reading specs from /home/etienne/projet/toolchain/lib/gcc-lib/i686-pc-linux-
gnu/2.95.3/specs
gcc version 2.95.3 20010315 (release)
etienne@fulbert:~/projet/gujin$ /home/etienne/projet/toolchain/bin/gcc -c test.c
test.c:1: field `a' already initialized

etienne@fulbert:~/projet/gujin$ /home/etienne/projet/toolchain-3.3.1/bin/gcc -v
Reading specs from /home/etienne/projet/toolchain-3.3.1/bin/../lib/gcc-lib/i686-
pc-linux-gnu/3.3.1/specs
Configured with: ../configure --prefix=/home/etienne/projet/toolchain --enable-
languages=c
Thread model: posix
gcc version 3.3.1
etienne@fulbert:~/projet/gujin$ /home/etienne/projet/toolchain-3.3.1/bin/gcc -c 
test.c
etienne@fulbert:~/projet/gujin$ /home/etienne/projet/toolchain-3.3.1/bin/gcc -
w -c test.c
etienne@fulbert:~/projet/gujin$ /home/etienne/projet/toolchain-3.3.1/bin/gcc -
Wall -c test.c
etienne@fulbert:~/projet/gujin$

  Etienne.


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