This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] __builtin_early_constant_p (PR c++/78420)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]