gcc error "treated as compound expression", SunCC compiles it.
825897Dec 22 2010 — edited Jan 19 2011Hi
This sample code compiles with SunCC, though I expected it not to.
/Lars V
#include <iostream>
class test
{
public:
test( int a )
{
}
};
int main()
{
int a( 5 );
int b( 6 );
const test & test_ref( "aaaaa", a, b, test( 1 ) );
const int & c ( "aaaaa", a, b );
std::cout << c << std::endl;
}
Generates the result: 6