public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* Uninitialized reference member should cause an error.
@ 2004-02-27 11:51 gwesp
  2004-03-03  0:27 ` Jim Wilson
  0 siblings, 1 reply; 2+ messages in thread
From: gwesp @ 2004-02-27 11:51 UTC (permalink / raw)
  To: feedback; +Cc: gcc-bugs, gwesp


>Submitter-Id:	net
>Originator:	Gerhard Wesp
>Confidential:	no
>Synopsis:	Uninitialized reference member should cause an error.
>Severity:	non-critical
>Priority:	medium
>Category:	c++
>Class:		accepts-illegal
>Release:	3.3.1 (SuSE Linux)
>Environment:
System: Linux ventus 2.4.21-166-smp4G #1 SMP Fri Dec 19 15:43:30 UTC 2003 i686 i686 i386 GNU/Linux
Architecture: i686

	
host: i586-suse-linux-gnu
build: i586-suse-linux-gnu
target: i586-suse-linux-gnu
configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib --enable-languages=c,c++,f77,objc,java,ada --disable-checking --enable-libgcj --with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib --with-system-zlib --enable-shared --enable-__cxa_atexit i586-suse-linux
>Description:
G++ accepts reference members without initialization.
>How-To-Repeat:
~% cat repeat.cpp ten                                  

struct foo { struct bar { int& x ; } ; bar y ; } ;
foo::bar f() { foo x ; return x.y ; }

~% g++ -Wall -c repeat.cpp
~% 
[File compiles OK]

I think this is an error, because the compiler-generated default
constructor for foo::bar cannot initialize foo::bar::x.  Comeau online
is of the same opinion.

Should this be legal, IMHO at least a warning should be produced!


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Uninitialized reference member should cause an error.
  2004-02-27 11:51 Uninitialized reference member should cause an error gwesp
@ 2004-03-03  0:27 ` Jim Wilson
  0 siblings, 0 replies; 2+ messages in thread
From: Jim Wilson @ 2004-03-03  0:27 UTC (permalink / raw)
  To: gwesp; +Cc: gcc-bugs

gwesp@flyelite.ch wrote:
> G++ accepts reference members without initialization.

You should file a bug report into our bugzilla bug database.  We do not 
track bugs reported by email, so you may not get an answer unless this 
gets into bugzilla.  See
	http://gcc.gnu.org/bugs.html
for more info on reporting bugs.

It looks like used the gccbug program.  This isn't very useful anymore, 
as we don't use GNAT (aka PRMS) for our bug database anymore.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-03-03  0:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-27 11:51 Uninitialized reference member should cause an error gwesp
2004-03-03  0:27 ` Jim Wilson

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).