[Bug c++/21619] [4.0/4.1 regression] __builtin_constant_p(&"Hello"[0])?1:-1 not compile-time constant

cvs-commit at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sun Jun 5 16:47:00 GMT 2005


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-06-05 16:47 -------
Subject: Bug 21619

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	mmitchel@gcc.gnu.org	2005-06-05 16:46:54

Modified files:
	gcc/cp         : ChangeLog cp-tree.h parser.c tree.c 

Log message:
	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.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.4648.2.57&r2=1.4648.2.58
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.1106.2.7&r2=1.1106.2.8
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.319.2.8&r2=1.319.2.9
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/tree.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.427.2.3&r2=1.427.2.4



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21619



More information about the Gcc-bugs mailing list