On Fri, Apr 27, 2018 at 08:07:36PM +0200, Jakub Jelinek wrote:
> init = fold (convert (type, nullptr_node)); unfortunately creates
> a NOP_EXPR around INTEGER_CST and constexpr.c doesn't consider that a valid
> constant; fold (convert (type, integer_zero_node)) we used previously
> on the other side emitted warnings.
> 
> The following patch just builds the INTEGER_CST directly.
> 
> Tested on x86_64-linux with make check-c++-all, ok for trunk and 8.1
> if it passes full bootstrap/regtest on {x86_64,i686}-linux?

Now successfully bootstrapped/regtested on both.  Ok?

> 2018-04-27  Jakub Jelinek  <ja...@redhat.com>
> 
>       PR c++/85553
>       * init.c (build_zero_init_1): For zero initialization of
>       NULLPTR_TYPE_P type use build_int_cst directly.
> 
>       * g++.dg/cpp0x/Wzero-as-null-pointer-constant-3.C: Add dg-bogus
>       directive.
>       * g++.dg/cpp0x/constexpr-85553.C: New test.

        Jakub

Reply via email to