This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/21619] [4.0 regression] __builtin_constant_p(&"Hello"[0])?1:-1 not compile-time constant
- From: "mmitchel at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Jun 2005 16:48:22 -0000
- Subject: [Bug c++/21619] [4.0 regression] __builtin_constant_p(&"Hello"[0])?1:-1 not compile-time constant
- References: <20050517114202.21619.rguenth@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From mmitchel at gcc dot gnu dot org 2005-06-05 16:48 -------
4.0.1 has a patch to tolerate array accesses in __builtin_constant_p arguments,
but __builtin_constant_p never returns 1 for arguments of pointer type on the
4.0 branch, so the original test case still will not compile on 4.0. In 4.1,
__builtin_constant_p is more clever, so the test case does work there.
--
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.0/4.1 regression] |[4.0 regression]
|__builtin_constant_p(&"Hello|__builtin_constant_p(&"Hello
|"[0])?1:-1 not compile-time |"[0])?1:-1 not compile-time
|constant |constant
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21619