Re: [C++ PATCH] Do not warn about zero-as-null when NULL is used.

2018-05-30 Thread Jason Merrill
On Wed, May 30, 2018 at 3:00 PM, Ville Voutilainen wrote: > On 30 May 2018 at 18:32, Ville Voutilainen > wrote: >> Now it does. This passes all the Wzero-as-null-pointer-constant tests in >> warn/ >> and cpp0x/, running full suite on Linux-PPC64. Ok for trunk if the tests >> pass? > > Here we

Re: [C++ PATCH] Do not warn about zero-as-null when NULL is used.

2018-05-30 Thread Ville Voutilainen
On 30 May 2018 at 18:32, Ville Voutilainen wrote: > Now it does. This passes all the Wzero-as-null-pointer-constant tests in warn/ > and cpp0x/, running full suite on Linux-PPC64. Ok for trunk if the tests > pass? Here we go again. :) 2018-05-30 Ville Voutilainen gcc/cp/ Do not

Re: [C++ PATCH] Do not warn about zero-as-null when NULL is used.

2018-05-30 Thread Ville Voutilainen
On 30 May 2018 at 18:12, Jason Merrill wrote: > Hmm, why doesn't maybe_warn_zero_as_null_pointer_constant check > null_node_p like it does NULLPTR_TYPE_P? Now it does. This passes all the Wzero-as-null-pointer-constant tests in warn/ and cpp0x/, running full suite on Linux-PPC64. Ok for trunk if

Re: [C++ PATCH] Do not warn about zero-as-null when NULL is used.

2018-05-30 Thread Jason Merrill
On Wed, May 30, 2018 at 5:24 AM, Ville Voutilainen wrote: > On 29 May 2018 at 23:43, Ville Voutilainen > wrote: >> Another round. The other occurrence of >> maybe_warn_zero_as_null_pointer_constant >> in typeck.c seems superfluous. The one in cvt.c seems necessary for >> cpp0x/Wzero-as-null*

Re: [C++ PATCH] Do not warn about zero-as-null when NULL is used.

2018-05-30 Thread Ville Voutilainen
On 29 May 2018 at 23:43, Ville Voutilainen wrote: > Another round. The other occurrence of > maybe_warn_zero_as_null_pointer_constant > in typeck.c seems superfluous. The one in cvt.c seems necessary for > cpp0x/Wzero-as-null* tests. It seems like cp_build_binary_op is far more > suited > to

Re: [C++ PATCH] Do not warn about zero-as-null when NULL is used.

2018-05-29 Thread Ville Voutilainen
Another round. The other occurrence of maybe_warn_zero_as_null_pointer_constant in typeck.c seems superfluous. The one in cvt.c seems necessary for cpp0x/Wzero-as-null* tests. It seems like cp_build_binary_op is far more suited to check the EQ_EXPR/NE_EXPR cases than conversion_null_warnings is.

Re: [C++ PATCH] Do not warn about zero-as-null when NULL is used.

2018-05-25 Thread Ville Voutilainen
On 25 May 2018 at 20:38, Ville Voutilainen wrote: > On 25 May 2018 at 20:27, Jason Merrill wrote: >> On Thu, May 24, 2018 at 8:04 PM, Ville Voutilainen >> wrote: >>> I smacked my head against conversion_null_warnings

Re: [C++ PATCH] Do not warn about zero-as-null when NULL is used.

2018-05-25 Thread Ville Voutilainen
On 25 May 2018 at 20:27, Jason Merrill wrote: > On Thu, May 24, 2018 at 8:04 PM, Ville Voutilainen > wrote: >> I smacked my head against conversion_null_warnings for a while, >> and then I realized that we could just stop convert_like_real from >>

Re: [C++ PATCH] Do not warn about zero-as-null when NULL is used.

2018-05-25 Thread Jason Merrill
On Thu, May 24, 2018 at 8:04 PM, Ville Voutilainen wrote: > I smacked my head against conversion_null_warnings for a while, > and then I realized that we could just stop convert_like_real from > changing the node type for null_node. Won't that sometimes mean that the

[C++ PATCH] Do not warn about zero-as-null when NULL is used.

2018-05-24 Thread Ville Voutilainen
I smacked my head against conversion_null_warnings for a while, and then I realized that we could just stop convert_like_real from changing the node type for null_node. Tested manually on Linux-x64, running full suite on Linux-PPC64, ok for trunk? 2018-05-25 Ville Voutilainen