[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#151182: g++-3.1: struct problems



Package: g++-3.1
Version: 1:3.1.1-0pre2
Severity: normal

Hi!

This program is giving me headaches:

struct test
{
	        char test;
};

int main(int argc, char ** argv)
{
	        return 0;
}

~/test > g++-3.1 -o test test.cc
~/test > g++-2.95 -o test test.cc
test.cc:3: ANSI C++ forbids data member `test' with same name as enclosing class

Version 2.95 got it right: This is no valid C++ (What happens if someone
adds a constructor to the struct?).

Regards,
Tobias

-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux c3po 2.4.18-my-686 #1 Sun Apr 7 20:53:09 CEST 2002 i686
Locale: LANG=C, LC_CTYPE=de_DE@euro

Versions of packages g++-3.1 depends on:
ii  gcc-3.1                    1:3.1.1-0pre2 The GNU C compiler.
ii  gcc-3.1-base               1:3.1.1-0pre2 The GNU Compiler Collection (base 
ii  libc6                      2.2.5-7       GNU C Library: Shared libraries an
ii  libstdc++4-dev             1:3.1.1-0pre2 The GNU stdc++ library version 3 (

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-gcc-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: