Bug#478734: g++-4.2: refuses to compile valid C++ syntax

2008-05-01 Thread Florian Weimer
* Jason Kraftcheck: > The same syntax is accepted by the only other C++ compiler I have > access too: Sun's. I guess what I don't understand is why, if I > create a temporary by explicitly calling the copy constructor, that > temporary is treated as an rvalue. The standard says so in section 3.1

Bug#478734: g++-4.2: refuses to compile valid C++ syntax

2008-05-01 Thread Jason Kraftcheck
The same syntax is accepted by the only other C++ compiler I have access too: Sun's. I guess what I don't understand is why, if I create a temporary by explicitly calling the copy constructor, that temporary is treated as an rvalue. So how do you want to proceed? If you're certain that you'r

Bug#478734: g++-4.2: refuses to compile valid C++ syntax

2008-05-01 Thread Daniel Jacobowitz
On Thu, May 01, 2008 at 10:39:24AM -0500, Jason Kraftcheck wrote: > Daniel Jacobowitz wrote: >> On Wed, Apr 30, 2008 at 05:51:32PM -0500, Jason Kraftcheck wrote: >>> Why can't I take a reference to an rvalue? >> >> Because you can't modify rvalues. This is the definition of the C++ >> language. T

Bug#478734: g++-4.2: refuses to compile valid C++ syntax

2008-05-01 Thread Jason Kraftcheck
Daniel Jacobowitz wrote: On Wed, Apr 30, 2008 at 05:51:32PM -0500, Jason Kraftcheck wrote: Why can't I take a reference to an rvalue? Because you can't modify rvalues. This is the definition of the C++ language. The next major revision of C++ will have T &&rref, the two ampersands declaring

Bug#478734: g++-4.2: refuses to compile valid C++ syntax

2008-04-30 Thread Daniel Jacobowitz
On Wed, Apr 30, 2008 at 05:51:32PM -0500, Jason Kraftcheck wrote: > Why can't I take a reference to an rvalue? Because you can't modify rvalues. This is the definition of the C++ language. The next major revision of C++ will have T &&rref, the two ampersands declaring an rvalue reference instead

Bug#478734: g++-4.2: refuses to compile valid C++ syntax

2008-04-30 Thread Jason Kraftcheck
Daniel Jacobowitz wrote: severity 478734 normal thanks On Wed, Apr 30, 2008 at 11:55:19AM -0500, Jason Kraftcheck wrote: Severity: grave This is not grave, g++ is perfectly usable for other code. I emmits the following error message: bug.cc: In function 'int main()': bug.cc:6: error: no m

Bug#478734: g++-4.2: refuses to compile valid C++ syntax

2008-04-30 Thread Daniel Jacobowitz
severity 478734 normal thanks On Wed, Apr 30, 2008 at 11:55:19AM -0500, Jason Kraftcheck wrote: > Severity: grave This is not grave, g++ is perfectly usable for other code. > I emmits the following error message: > > bug.cc: In function 'int main()': > bug.cc:6: error: no matching function for

Processed: Re: Bug#478734: g++-4.2: refuses to compile valid C++ syntax

2008-04-30 Thread Debian Bug Tracking System
Processing commands for [EMAIL PROTECTED]: > severity 478734 normal Bug#478734: g++-4.2: refuses to compile valid C++ syntax Severity set to `normal' from `grave' > thanks Stopping processing here. Please contact me if you need assistance. Debian bug tracking syst

Bug#478734: g++-4.2: refuses to compile valid C++ syntax

2008-04-30 Thread Jason Kraftcheck
Package: g++-4.2 Version: 4.2.3-4 Severity: grave Justification: renders package unusable g++ refuses to compile the following syntax commonly used to force a std::vector to release allocated memory: #include int main() { std::vector v; v.clear(); v.swap( std::vector(v) );