This is the mail archive of the gcc-help@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]

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

   http://msdn.microsoft.com/library/en-us/vccore/html/C4239.asp

and won't compile if you turn off extensions with flag '/Za'.

Rup.


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