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 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 am

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:

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

Bug#217360: gcc-3.2: meaningless warning for %p in format strings

2003-10-30 Thread Jason Kraftcheck
Falk Hueffner wrote: Jason Kraftcheck <[EMAIL PROTECTED]> writes: In practice, how can it be anything other than a void*? It can't. You know, the "-pedantic" option is called "-pedantic" for a Yes, but there's a difference between pedantic and pointless. Alt

Bug#217360: gcc-3.2: meaningless warning for %p in format strings

2003-10-30 Thread Jason Kraftcheck
Falk Hueffner wrote: Jason Kraftcheck <[EMAIL PROTECTED]> writes: The C standard says there's a difference between printing a void* and a int* (or any other type)? How can a pointer passed through a var-args list be anything but a void*? The C standard may say that %p prints a void*

Bug#217360: gcc-3.2: meaningless warning for %p in format strings

2003-10-30 Thread Jason Kraftcheck
Falk Hueffner wrote: Jason Kraftcheck <[EMAIL PROTECTED]> writes: If the following is compiled with the options -Wall -pedantic-errors : #include int main( ) { int i; printf("%p\n", &i ); return 0; } gcc emits the following: voidptr.c: In function `main

Bug#217360: gcc-3.2: meaningless warning for %p in format strings

2003-10-24 Thread Jason Kraftcheck
Package: gcc-3.2 Version: 1:3.2.3-8 Severity: minor If the following is compiled with the options -Wall -pedantic-errors : #include int main( ) { int i; printf("%p\n", &i ); return 0; } gcc emits the following: voidptr.c: In function `main': voidptr.c:5: warning: void fo

Bug#216280: g++-3.3: lvalue evaluated twice for ?: operator

2003-10-19 Thread Jason Kraftcheck
Falk Hueffner wrote: Jason Kraftcheck <[EMAIL PROTECTED]> writes: The output of the following code, when compiled with g++-3.3 is '2'. It should be '1'. I cannot reproduce this with g++-3.3 1:3.3.2-0pre5.0.1 (3.3.2 20031005) on Alpha. Maybe it's target specific

Bug#216280: g++-3.3: lvalue evaluated twice for ?: operator

2003-10-17 Thread Jason Kraftcheck
Package: g++-3.3 Version: 1:3.3.2-0pre4 Severity: normal The output of the following code, when compiled with g++-3.3 is '2'. It should be '1'. #include struct foo { foo(): v(0), c(0) {} int& value() { c++; return v; } int count() { return c; } int v, c; };