This is the mail archive of the
mailing list for the GCC project.
RE: Copy Constructor Problem with 3.2.2??
- From: "Rupert Wood" <me at rupey dot net>
- To: "'Joe Buck'" <Joe dot Buck at synopsys dot COM>,"'Phil Prentice'" <philp dot cheer at btinternet dot com>
- Cc: <gcc-help at gnu dot org>,<gcc at gnu dot org>
- Date: Fri, 18 Jun 2004 18:29:00 +0100
- Subject: RE: Copy Constructor Problem with 3.2.2??
Joe Buck wrote:
> > I have knocked up a simple program that demonstrates this problem.
> > I have compiled this same program using Visual C++ (windows) and
> > it compiles & runs as I would have expected.
> Then you should send a bug report to Microsoft. If the compiler
> accepts an attempt to bind a non-const reference to a temporary,
> this is a serious error in the compiler.
It's a documented extension. The example does raise a level 4 warning
and won't compile if you turn off extensions with flag '/Za'.