This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH] [PR2204] Check for parameters of abstract types - Take 3
- From: "Giovanni Bajo" <giovannibajo at libero dot it>
- To: "Mark Mitchell" <mark at codesourcery dot com>,"Jason Merrill" <jason at redhat dot com>
- Cc: <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 15 Jun 2004 02:05:12 +0200
- Subject: Re: [C++ PATCH] [PR2204] Check for parameters of abstract types - Take 3
- References: <1c9c01c3ef6c$71c10f10$9cba2997@bagio><m3vfmf3ctv.fsf@uniton.integrable-solutions.net><1d8201c3ef7f$41471b50$9cba2997@bagio><m3bro73bft.fsf@uniton.integrable-solutions.net><1f3901c3effc$90c19a70$9cba2997@bagio><xyp65bh9lnc.fsf@miranda.boston.redhat.com><26e001c44faa$9ab6ea90$444e2a97@bagio><40CC0ABC.3050009@codesourcery.com> <xypvfhtlwtk.fsf@miranda.boston.redhat.com>
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