]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR c++/19628 (g++ no longer accepts __builtin_constant_p in constant-expressions)
authorMatt Austern <austern@apple.com>
Thu, 3 Feb 2005 00:02:10 +0000 (00:02 +0000)
committerMatt Austern <austern@gcc.gnu.org>
Thu, 3 Feb 2005 00:02:10 +0000 (00:02 +0000)
commit100d337a9d06bbc8f367e37debbe69610b04e72f
tree54f1d79812354b990fbbfe75895aedd5f2372e9c
parent89d12f5d49829d3dbf9a78040b88df833923c0df
re PR c++/19628 (g++ no longer accepts __builtin_constant_p in constant-expressions)

PR c++/19628

* cp-tree.h (builtin_valid_in_constant_expr_p): Declare.
* parser.c (cp_parser_postfix_expression): Accept function call in constant expression if builtin_valid_in_constant_expr_p is true for that function.
* pt.c (value_dependent_expression_p): Handle CALL_EXPRs properly.
* semantics.c (finish_id_expression): Accept function call in constant expression if builtin_valid_in_constant_expr_p is true for that function.
* tree.c (builtin_valid_in_constant_expr_p): New.

* g++/ext/builtin7.C: New.
* g++/ext/builtin8.C: New.

From-SVN: r94635
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/parser.c
gcc/cp/pt.c
gcc/cp/semantics.c
gcc/cp/tree.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ext/builtin7.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/builtin8.C [new file with mode: 0644]