r265734 - in /trunk/gcc: cp/ChangeLog cp/decl.c...

mpolacek@gcc.gnu.org mpolacek@gcc.gnu.org
Thu Nov 1 22:10:00 GMT 2018


Author: mpolacek
Date: Thu Nov  1 22:10:31 2018
New Revision: 265734

URL: https://gcc.gnu.org/viewcvs?rev=265734&root=gcc&view=rev
Log:
	Implement P0846R0, ADL and function templates.
	* decl.c (grokfndecl): Allow FUNCTION_DECL in assert.
	* lex.c (unqualified_fn_lookup_error): Handle TEMPLATE_ID_EXPR.
	* parser.c (cp_parser_postfix_expression): Do ADL for a template-name.
	(cp_parser_template_id): Give errors if parsing the template argument
	list didn't go well.  Allow FUNCTION_DECL in assert.
	(cp_parser_template_name): Consider a name to refer to a template if
	it is an unqualified-id followed by a <.  Don't return the identifier
	if the decl is a function and dependent.
	* pt.c (tsubst_copy) <case OVERLOAD>: Remove assert.

	* g++.dg/addr_builtin-1.C: Adjust dg-error.
	* g++.dg/cpp2a/fn-template1.C: New test.
	* g++.dg/cpp2a/fn-template10.C: New test.
	* g++.dg/cpp2a/fn-template11.C: New test.
	* g++.dg/cpp2a/fn-template12.C: New test.
	* g++.dg/cpp2a/fn-template13.C: New test.
	* g++.dg/cpp2a/fn-template14.C: New test.
	* g++.dg/cpp2a/fn-template15.C: New test.
	* g++.dg/cpp2a/fn-template16.C: New test.
	* g++.dg/cpp2a/fn-template2.C: New test.
	* g++.dg/cpp2a/fn-template3.C: New test.
	* g++.dg/cpp2a/fn-template4.C: New test.
	* g++.dg/cpp2a/fn-template5.C: New test.
	* g++.dg/cpp2a/fn-template6.C: New test.
	* g++.dg/cpp2a/fn-template7.C: New test.
	* g++.dg/cpp2a/fn-template8.C: New test.
	* g++.dg/cpp2a/fn-template9.C: New test.
	* g++.dg/parse/fn-template1.C: New test.
	* g++.dg/parse/fn-template2.C: New test.
	* g++.dg/parse/template19.C: Adjust dg-error.
	* g++.dg/template/pr61745.C: Add target to dg-error.

Added:
    trunk/gcc/testsuite/g++.dg/cpp2a/fn-template1.C
    trunk/gcc/testsuite/g++.dg/cpp2a/fn-template10.C
    trunk/gcc/testsuite/g++.dg/cpp2a/fn-template11.C
    trunk/gcc/testsuite/g++.dg/cpp2a/fn-template12.C
    trunk/gcc/testsuite/g++.dg/cpp2a/fn-template13.C
    trunk/gcc/testsuite/g++.dg/cpp2a/fn-template14.C
    trunk/gcc/testsuite/g++.dg/cpp2a/fn-template15.C
    trunk/gcc/testsuite/g++.dg/cpp2a/fn-template16.C
    trunk/gcc/testsuite/g++.dg/cpp2a/fn-template2.C
    trunk/gcc/testsuite/g++.dg/cpp2a/fn-template3.C
    trunk/gcc/testsuite/g++.dg/cpp2a/fn-template4.C
    trunk/gcc/testsuite/g++.dg/cpp2a/fn-template5.C
    trunk/gcc/testsuite/g++.dg/cpp2a/fn-template6.C
    trunk/gcc/testsuite/g++.dg/cpp2a/fn-template7.C
    trunk/gcc/testsuite/g++.dg/cpp2a/fn-template8.C
    trunk/gcc/testsuite/g++.dg/cpp2a/fn-template9.C
    trunk/gcc/testsuite/g++.dg/parse/fn-template1.C
    trunk/gcc/testsuite/g++.dg/parse/fn-template2.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/decl.c
    trunk/gcc/cp/lex.c
    trunk/gcc/cp/parser.c
    trunk/gcc/cp/pt.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/g++.dg/addr_builtin-1.C
    trunk/gcc/testsuite/g++.dg/parse/template19.C
    trunk/gcc/testsuite/g++.dg/template/pr61745.C



More information about the Gcc-cvs mailing list