Commit 625cbf93 by Mark Mitchell Committed by Mark Mitchell

re PR c++/14550 (trouble with pointers in templates)

	PR c++/14550
	* parser.c (cp_parser_non_integral_constant_expression): Encode
	more of the idiom that surrounded calls to this function within
	the function itself
	(cp_parser_primary_expression): Adjust accordingly.
	(cp_parser_postfix_expression): Likewise.
	(cp_parser_unary_expression): Likewise.
	(cp_parser_cast_expression): Likewise.
	(cp_parser_assignment_expression): Likewise.
	(cp_parser_expression): Likewise.
	(cp_parser_new_expression): Note that new-expressions are not
	allowed in integral constant expressions.
	(cp_parser_delete_expression): Likewise.

	PR c++/14550
	* g++.dg/parse/template14.C: New test.

From-SVN: r79498
parent 983e6484
2004-03-13 Mark Mitchell <mark@codesourcery.com>
PR c++/14550
* parser.c (cp_parser_non_integral_constant_expression): Encode
more of the idiom that surrounded calls to this function within
the function itself
(cp_parser_primary_expression): Adjust accordingly.
(cp_parser_postfix_expression): Likewise.
(cp_parser_unary_expression): Likewise.
(cp_parser_cast_expression): Likewise.
(cp_parser_assignment_expression): Likewise.
(cp_parser_expression): Likewise.
(cp_parser_new_expression): Note that new-expressions are not
allowed in integral constant expressions.
(cp_parser_delete_expression): Likewise.
2004-03-12 Matt Austern <austern@apple.com>
* decl2.c (maybe_make_one_only): Look at
......
2004-03-13 Mark Mitchell <mark@codesourcery.com>
PR c++/14550
* g++.dg/parse/template14.C: New test.
2004-03-13 Eric Botcazou <ebotcazou@libertysurf.fr>
* gcc.c-torture/execute/20040313-1.c: New test.
......
// PR c++/14550
struct A {
A();
};
template <int> void foo()
{
A *p = new A;
}
void bar()
{
foo<0>();
}
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