[C++ PATCH] [PR2204] Check for parameters of abstract types - Take 3

Gabriel Dos Reis gdr@acm.org
Tue Jun 15 07:39:00 GMT 2004


You Wrote Giovanni Bajo
> Mark Mitchell wrote:
>
>>> I will have to create a different incomplete_vars list which stores
>>> couples of IDENTIFIER_NODE and TREE_TYPE instead of declarations,
>>> for the purpose of delayed evaluation of abstractness.
>>
>> I'm sure I'm being dense, but can you back up and explain why we need
>> to save away information at all?
>
> Yes. See also comment #3 in Bugzilla, which I quote:
>
> ------------------------
> The problem is that we currently check for abstractness of parameter types
> in
> gorkparms, which is way too early for the current class. Putting it into
> start_function is a stop-gap, but 10.4/3 says that *declarations* are ill-
> formed, there is no need for a definition.

yes, but that paragraph does not apply to the example given by
Mark -- declarations at non-class scope are processed in there
order of appearance.  By the time you see the declaration for f,
lookup says that S is incomplete and we don't know it is abstract.
When S is completed, that happens after the declaration of f so
it does not affect the well-form-ness of that declaration.



More information about the Gcc-patches mailing list