PATCH for Re: foo.cc:15: Internal compiler error.
Mark Mitchell
mark@markmitchell.com
Mon May 25 09:50:00 GMT 1998
>>>>> "Alexandre" == Alexandre Oliva <oliva@dcc.unicamp.br> writes:
Alexandre> Mark Mitchell <mark@markmitchell.com> writes:
>> I think you're misreading this. It's legal, for example, to
>> say:
>> void foo(class A* ap);
Alexandre> AFAIK, it is not legal for forward-declare in a
Alexandre> function argument declaration, but I can't find this
Alexandre> requirement in the Nov'97 DWP, was it dropped?
This has always been legal, I think, and is certainly explicitly
endorsed in [basic.scope.pdecl]:
The point of declaration of a class first declared in an
elaborated-type-specifier is as follows:
if the elaborated-type-specifier is used in the decl-specifier-seq
or parameter-declaration-clause of a function defined in namespace
scope, the identifier is declared as a class-name in the namespace
that contains the declaration;
--
Mark Mitchell mark@markmitchell.com
Mark Mitchell Consulting http://www.markmitchell.com
More information about the Gcc-bugs
mailing list