Commit 643aee72 by Mark Mitchell Committed by Mark Mitchell

* parser.c (cp_parser_parameter_declaration): Fix comment.

From-SVN: r75409
parent ae0eb5f1
2004-01-04 Mark Mitchell <mark@codesourcery.com> 2004-01-04 Mark Mitchell <mark@codesourcery.com>
* parser.c (cp_parser_parameter_declaration): Fix comment.
PR c++/12226 PR c++/12226
* call.c (CHECK_COPY_CONSTRUCTOR_P): New macro. * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
(reference_binding): Set it when appropriate. (reference_binding): Set it when appropriate.
......
...@@ -3909,8 +3909,9 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p) ...@@ -3909,8 +3909,9 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p)
/* These operators may not appear in constant-expressions. */ /* These operators may not appear in constant-expressions. */
if (parser->integral_constant_expression_p if (parser->integral_constant_expression_p
/* The "->" operator is allowed in the implementation /* The "->" operator is allowed in the implementation
of "offsetof". */ of "offsetof". The "." operator may appear in the
&& !(parser->in_offsetof_p && token_type == CPP_DEREF)) name of the member. */
&& !parser->in_offsetof_p)
{ {
if (!parser->allow_non_integral_constant_expression_p) if (!parser->allow_non_integral_constant_expression_p)
postfix_expression postfix_expression
...@@ -10977,12 +10978,13 @@ cp_parser_parameter_declaration (cp_parser *parser, ...@@ -10977,12 +10978,13 @@ cp_parser_parameter_declaration (cp_parser *parser,
expression. Therefore, if parsing tentatively, we commit at expression. Therefore, if parsing tentatively, we commit at
this point. */ this point. */
if (!parser->in_template_argument_list_p if (!parser->in_template_argument_list_p
/* Having seen: /* In an expression context, having seen:
(int((char *)... (int((char *)...
we cannot be sure whether we are looking at a we cannot be sure whether we are looking at a
function-type (taking a */ function-type (taking a "char*" as a parameter) or a cast
of some object of type "char*" to "int". */
&& !parser->in_type_id_in_expr_p && !parser->in_type_id_in_expr_p
&& cp_parser_parsing_tentatively (parser) && cp_parser_parsing_tentatively (parser)
&& !cp_parser_committed_to_tentative_parse (parser) && !cp_parser_committed_to_tentative_parse (parser)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment