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]: Fix 11050


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


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