+2004-01-28 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/13736
+ * parser.c (cp_parser_direct_declarator): Do not prevent
+ backtracking inside a parenthesized declarator.
+ (cp_parser_parameter_declaration): Fix typo in comment.
+
2004-01-28 Jan Hubicka <jh@suse.cz>
* semantics.c (expand_body) Do emit_associated_thunks before
declarator. */
if (first)
{
+ bool saved_in_type_id_in_expr_p;
+
parser->default_arg_ok_p = saved_default_arg_ok_p;
parser->in_declarator_p = saved_in_declarator_p;
/* Consume the `('. */
cp_lexer_consume_token (parser->lexer);
/* Parse the nested declarator. */
+ saved_in_type_id_in_expr_p = parser->in_type_id_in_expr_p;
+ parser->in_type_id_in_expr_p = true;
declarator
= cp_parser_declarator (parser, dcl_kind, ctor_dtor_or_conv_p,
/*parenthesized_p=*/NULL);
+ parser->in_type_id_in_expr_p = saved_in_type_id_in_expr_p;
first = false;
/* Expect a `)'. */
if (!cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'"))
if (!parser->in_template_argument_list_p
/* In an expression context, having seen:
- (int((char *)...
+ (int((char ...
we cannot be sure whether we are looking at a
- function-type (taking a "char*" as a parameter) or a cast
- of some object of type "char*" to "int". */
+ 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
&& cp_parser_parsing_tentatively (parser)
&& !cp_parser_committed_to_tentative_parse (parser)
+2004-01-28 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/13736
+ * g++.dg/parse/cast2.C (main): New test.
+
2004-01-27 James E Wilson <wilson@specifixinc.com>
* objc.dg/encode-2.m (main): New local string. Set depending on