r235845 - in /trunk/gcc: ChangeLog builtins.c c...

msebor@gcc.gnu.org msebor@gcc.gnu.org
Tue May 3 21:15:00 GMT 2016


Author: msebor
Date: Tue May  3 21:15:28 2016
New Revision: 235845

URL: https://gcc.gnu.org/viewcvs?rev=235845&root=gcc&view=rev
Log:
PR c++/66561 - __builtin_LINE at al. should yield constant expressions
PR c++/66639 - declare __func__, __FUNCTION__ & __PRETTY_FUNCTION__ constexpr

gcc/testsuite/ChangeLog:
2016-05-03  Martin Sebor  <msebor@redhat.com>

	PR c++/66561
	* c-c++-common/builtin_location.c: New test.
	* g++.dg/cpp1y/builtin_location.C: New test.

gcc/cp/ChangeLog:
2016-05-03  Martin Sebor  <msebor@redhat.com>

	PR c++/66561
	* tree.c (builtin_valid_in_constant_expr_p): Treat BUILT_IN_FILE,
	BUILT_IN_FUNCTION, and BUILT_IN_LINE as constant expressions.

gcc/ChangeLog:
2016-05-03  Martin Sebor  <msebor@redhat.com>

	PR c++/66561
	* builtins.c (fold_builtin_FILE): New function.
	(fold_builtin_FUNCTION, fold_builtin_LINE): New functions.
	(fold_builtin_0): Call them.
	* gimplify.c (gimplify_call_expr): Remove the handling of
	BUILT_IN_FILE, BUILT_IN_FUNCTION, and BUILT_IN_LINE.

	PR c++/66561
	* doc/extend.texi (Other Builtins): Update __builtin_FILE,
	__builtin_FUNCTION, and __builtin_LINE to reflect they yield
	constants.

	PR c++/66639
	* doc/extend.texi (Function Names as Strings): Update __func__,
	__FUNCTION__, __PRETTY_FUNCTION__ to reflect they evaluate to
	constants.


Added:
    trunk/gcc/testsuite/c-c++-common/builtin_location.c
    trunk/gcc/testsuite/g++.dg/cpp1y/builtin_location.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/builtins.c
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/tree.c
    trunk/gcc/doc/extend.texi
    trunk/gcc/gimplify.c
    trunk/gcc/testsuite/ChangeLog



More information about the Gcc-cvs mailing list