On further thought, I see that g++ allows "A()" as a shortcut for "A(*)()", so 
it confuses "B b(A());" with a function declaration. As this might be as 
designed, I am closing this bug.
But still, I think that this code should be perfectly legal. Also, the compiler 
error would be much clearer if it said "B (*)(A (*)())" instead of "B(A 
(*)())". Overall, allowing that shortcut doesn’t seems like a good idea to me.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/799066

Title:
  Parsing issue: Instance reinterpreted as function-pointer something

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/799066/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to