re PR c++/21619 (__builtin_constant_p(&"Hello"[0])?1:-1 not compile-time constant)
authorMark Mitchell <mark@codesourcery.com>
Sun, 5 Jun 2005 16:33:43 +0000 (16:33 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Sun, 5 Jun 2005 16:33:43 +0000 (16:33 +0000)
commit88a7beb769bd14c1affeb7c801842058e3071ab6
tree09ed262a183deef78ec843c1e53a4e09cbc6dda4
parent1d508aa99c31e13d6712873d5be5ef04a902807d
re PR c++/21619 (__builtin_constant_p(&"Hello"[0])?1:-1 not compile-time constant)

PR c++/21619
* cp-tree.h (DECL_IS_BUILTIN_CONSTANT_P): New macro.
* parser.c (cp_parser_postfix_expression): Allow non-constant
expressions as arguments to __builtin_constant_p.
* tree.c (builtin_valid_in_constant_expr_p): Use
DECL_IS_BUILTIN_CONSTANT_P.

PR c++/21619
* g++.dg/ext/builtin9.C: New test.

From-SVN: r100626
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/parser.c
gcc/cp/tree.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ext/builtin9.C [new file with mode: 0644]