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++/12615] New: initializer syntax for PAD structs gives parse error


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

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

           Summary: initializer syntax for PAD structs gives parse error
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bruno at clisp dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


The following snippet of code used to compile with g++ 3.2.2, but now
gives an error.

============================ bug1.cc ===================================
struct object
{
  unsigned long one_o;
  unsigned int allocstamp;
};
void gc_mark (object obj)
{
  object vorg = (object) { one_o: 0, allocstamp: 0 };
}
========================================================================
$ g++ -O -c bug1.cc
bug1.cc: In function `void gc_mark(object)':
bug1.cc:8: error: `object' has no non-static data member named
`object::one_o'
bug1.cc:8: error: too many initializers for `object'

Environment:
System: Linux honolulu.ilog.fr 2.4.21-0.13mdk #1 Fri Mar 14 15:08:06 EST 2003 i686 unknown unknown GNU/Linux
Architecture: i686

host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc-3.3.1/configure --prefix=/home/haible/gnu/inst-gcc/3.3.1 --enable-shared --enable-threads=posix --enable-long-long --enable-__cxa_atexit --enable-languages=c,c++,ada,f77,objc,java --with-system-zlib

How-To-Repeat:

See above,
------- Additional Comments From bruno at clisp dot org  2003-10-14 19:37 -------
Fix:

unknown.


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