Commit f2ce60b8 by Nathan Sidwell Committed by Nathan Sidwell

re PR c++/3902 ([parser] ambiguous 8.2/7)

cp:
	PR c++/3902
	* parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
	inside a declarator.
testsuite:
	PR c++/3902
	* g++.dg/parse/template5.C: New test.

From-SVN: r61987
parent f42aadd8
2003-01-28 Nathan Sidwell <nathan@codesourcery.com>
PR c++/3902
* parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
inside a declarator.
2003-01-27 Nathan Sidwell <nathan@codesourcery.com>
* class.c (update_vtable_entry_for_fn): Add index parameter.
......
......@@ -6518,8 +6518,8 @@ cp_parser_decl_specifier_seq (cp_parser* parser,
{
tree decl_specs = NULL_TREE;
bool friend_p = false;
bool constructor_possible_p = true;
bool constructor_possible_p = !parser->in_declarator_p;
/* Assume no class or enumeration type is declared. */
*declares_class_or_enum = false;
......
2003-01-28 Nathan Sidwell <nathan@codesourcery.com>
PR c++/3902
* g++.dg/parse/template5.C: New test.
2003-01-28 Toon Moene <toon@moene.indiv.nluug.nl>
PR fortran/9258
......
// { dg-do compile }
// Copyright (C) 2003 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 28 Jan 2003 <nathan@codesourcery.com>
// PR 3902. More type/decl confusion.
template <class T>
struct S
{
S foo (T (T));
S foo (T(const T&));
};
int main ()
{
S<int> (S<int>::*pf1)(int (int)) = &S<int>::foo;
S<int> (S<int>::*pf2)(int (const int&)) = &S<int>::foo;
}
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