This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [C++] NEW_EXPR and PR c++/11406
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: 22 Jul 2003 00:58:18 +0200
- Subject: Re: [C++] NEW_EXPR and PR c++/11406
- Organization: Integrable Solutions
- References: <m3k7abtslz.fsf@uniton.integrable-solutions.net><1058828209.19997.38.camel@doubledemon.codesourcery.com>
[ I messed with the addressed in an earlier posting -- sorry ]
Mark Mitchell <mark@codesourcery.com> writes:
| > for the new-expression at line #3, the parser seems to be building
| >
| > NEW_EXPR (NULL,
| > TREE_LIST ( ARRAY_REF ( ... ),
| > NULL)
| >
| > where the tree dumper expects
| >
| > NEW_EXPR (NULL,
| > ARRAY_REF ( ... ),
| > NULL)
| >
| > therefore the sorry+ICE.
| >
| > Is the TREE_LIST to be expected? That seems a bit odd.
|
| Yes, it's odd -- but yes, it's also expected. (See
| cp_parser_new_type_id.)
OK, thanks.
| That second parameter should really be a TYPE -- not a declarator
| thingy. If you are interested in fixing that, you want to move the bits
| out of build_new that handle the TREE_LIST case and move them into the
| parser.
It seems the long-term winning plan is to fix the logic of building
new-expression and not hack cp/error.c to accept the TREE_LIST in
new-expression. Is that correct?
-- Gaby