F
Fraser Ross
class A{};
void func() {
sizeof ( A (A()) );
sizeof ( ( A (A()) ) );
sizeof ( A ((A())) );
}
The first operand is a type-id of a function. It doesn't compile with
Comeau which is fine.
The other two are supposed to be making the operands get parsed as
expressions. The third is the typical way using extra parentheses
around the first parameter. The second compiles and the third doesn't
with Comeau.
I expected the opposite. I think the third might be a bug. I'm not
sure about the second.
Fraser.
void func() {
sizeof ( A (A()) );
sizeof ( ( A (A()) ) );
sizeof ( A ((A())) );
}
The first operand is a type-id of a function. It doesn't compile with
Comeau which is fine.
The other two are supposed to be making the operands get parsed as
expressions. The third is the typical way using extra parentheses
around the first parameter. The second compiles and the third doesn't
with Comeau.
I expected the opposite. I think the third might be a bug. I'm not
sure about the second.
Fraser.