This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Problems with exception handling in 2.96 snapshots
Nathan Sidwell wrote:
> So, your throw specifier is a declaration and A is incomplete at that point.
> This is annoying. However, there is a bigger problem, which looks like a defect
> in the standard. Here it is
>
> struct A {
> void baz (A arg);
> void foo (A arg) {}
> };
> void A::baz (A arg) {}
>
> Here A::foo is a definition, so its parameters may not have incomplete type.
> A::baz in A is not a definition, so its parameters may have incomplete type.
> The definition of A::baz is after the definition of A, so A is complete.
To followup myself, I see this is core issue 135
http://www.informatik.hu-berlin.de/~loewis/corer8.html#135
I'll submit a bit more to that about throw specifiers, as I think your
example should be valid.
nathan
--
Dr Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org