This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] __builtin_early_constant_p (PR c++/78420)
- From: Jason Merrill <jason at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Richard Biener <rguenther at suse dot de>, Jonathan Wakely <jwakely at redhat dot com>, gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 8 Mar 2018 10:03:45 -0500
- Subject: Re: [PATCH] __builtin_early_constant_p (PR c++/78420)
- Authentication-results: sourceware.org; auth=none
- References: <20180307220437.GF5866@tucnak>
On Wed, Mar 7, 2018 at 5:04 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> - /* Don't fold __builtin_constant_p within a constexpr function. */
> - bool bi_const_p = (DECL_FUNCTION_CODE (fun) == BUILT_IN_CONSTANT_P);
> + /* Don't fold __builtin_{,early_}constant_p within a constexpr function. */
> + bool bi_const_p
> + = (DECL_FUNCTION_CODE (fun) == BUILT_IN_CONSTANT_P
> + || DECL_FUNCTION_CODE (fun) == BUILT_IN_EARLY_CONSTANT_P);
Let's use DECL_IS_BUILTIN_CONSTANT_P here. With that change the C++
bits are OK.
Jason