This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Jason Merrill wrote:

> I suggested another way.  It is in fact a constraint violation to
> have an array of abstract types regardless of where it appears, so we really
> should be checking in create_array_type_for_decl regardless of what we do for
> parms.

Yes, that was my first approacch, but there was no declaration at that point
either, and I needed one to register the parameter in the incomplete_vars list.
So I moved the test outside, in the called for create_array_type_for_decl,
which is grokdeclarator, a few lines below (where we also have the complete
type of the symbol being declared). Of course, now that I know I must find a
solution which does not involve creating a declaration, I can move back the
test there.

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.

Giovanni Bajo



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]