This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH]: Fix 11050
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Nathan Sidwell <nathan at codesourcery dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: 10 Jul 2003 09:16:30 -0700
- Subject: Re: [C++ PATCH]: Fix 11050
- References: <3F0D6DEC.5020601@codesourcery.com>
On Thu, 2003-07-10 at 06:45, Nathan Sidwell wrote:
> Mark,
> this fixes 11050, where we not only accepted 'foo ("a" __FUNCTION__)'
> but would also accepth 'foo (2 2)' by silently ignoring the second 2!
Wow.
A few picky comments:
(cp_parser_parens_expression_list): ... here. Add attribute
parameter, parse the surounding parentheses.
Let's name this "cp_parser_parenthesized_expression_list", just because
the new parser uses whole words in most of its names. I didn't realize
I'd replicated that code so many times -- nice to put it all in one
place.
* pt.c (any_type_dependent_arguments_p): Don't fail with
error_mark_node.
I think a better way to fix this is simply to make
type_dependent_expression_p return true for the error_mark_node. (Note
that dependent_type_p already treats error_mark_node as non-dependent.)
By doing this, "<error> + 3" will get collapsed to "<error>" at
parse-time, which means that we'll have less tree structure to deal with
at instantiation time.
OK with those changes. Thanks!
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com