This is the mail archive of the gcc-cvs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

r277732 - in /trunk/gcc: cp/ChangeLog cp/conste...


Author: jakub
Date: Fri Nov  1 23:26:17 2019
New Revision: 277732

URL: https://gcc.gnu.org/viewcvs?rev=277732&root=gcc&view=rev
Log:
	PR c++/91369 - Implement P0784R7: constexpr new
	* cp-tree.h (CALL_FROM_NEW_OR_DELETE_P): Define.
	* init.c (build_new_1, build_vec_delete_1, build_delete): Set
	CALL_FROM_NEW_OR_DELETE_P on the CALL_EXPR to allocator functions.
	* constexpr.c (is_std_allocator_allocate): Only allow
	global replaceable allocator functions if CALL_FROM_NEW_OR_DELETE_P
	or in std::allocate<T>::{,de}allocate.
	(potential_constant_expression_1): Likewise.

	* g++.dg/cpp2a/constexpr-new6.C: New test.
	* g++.dg/cpp2a/constexpr-new7.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/cpp2a/constexpr-new6.C
    trunk/gcc/testsuite/g++.dg/cpp2a/constexpr-new7.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/constexpr.c
    trunk/gcc/cp/cp-tree.h
    trunk/gcc/cp/init.c
    trunk/gcc/testsuite/ChangeLog


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]