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: "mark at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Jun 2005 17:57:14 -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 mark at codesourcery dot com 2005-06-05 17:57 -------
Subject: Re: [4.0 regression] __builtin_constant_p(&"Hello"[0])?1:-1
not compile-time constant
mark at codesourcery dot com wrote:
> ------- Additional Comments From mark at codesourcery dot com 2005-06-05 17:35 -------
> Subject: Re: [4.0 regression] __builtin_constant_p(&"Hello"[0])?1:-1
> not compile-time constant
>
> pinskia at gcc dot gnu dot org wrote:
>
>>------- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-05 17:30 -------
>>Mark this is fixed on the 4.0 branch, the middle-end part was PR 21595 and was commited to 4.0
>>branch:
>>2005-05-27 Richard Guenther <rguenth@gcc.gnu.org>
>>
>> PR middle-end/21595
>> * builtins.c (fold_builtin_constant_p): Handle
>> &"string cst"[0] as constant.
>>
>>And the testcase here works now.
>>
>>Were you using an old branch to test on?
That was exactly the problem; I've now checked in the testcase and will
close the PR.
Thanks!
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21619