Re: [PATCH] gcc warning 'expression which evaluates to zero treated as a null pointer'

2019-11-14 Thread didier
Hi, On Wed, Nov 13, 2019 at 10:01 PM Tom Lane wrote: > > didier writes: > > clang -E output before 7a0574b5 > > HeapTuple newtuple = 0; > > with 7a0574b5 > > HeapTuple newtuple = ((bool) 0); > > Hm, did you re-run configure after 7a0574b5? If you didn't, it would > have gone through the not-std

Re: [PATCH] gcc warning 'expression which evaluates to zero treated as a null pointer'

2019-11-13 Thread Tom Lane
didier writes: > clang -E output before 7a0574b5 > HeapTuple newtuple = 0; > with 7a0574b5 > HeapTuple newtuple = ((bool) 0); Hm, did you re-run configure after 7a0574b5? If you didn't, it would have gone through the not-stdbool.h path in c.h, which might account for this. It's a good catch tho

Re: [PATCH] gcc warning 'expression which evaluates to zero treated as a null pointer'

2019-11-13 Thread didier
Hi, On Wed, Nov 13, 2019 at 8:52 PM Tom Lane wrote: > > didier writes: > > Trivial patch: > > - remove a gcc warning (since commit 7a0574b5) > > expression which evaluates to zero treated as a null pointer constant of > > type 'HeapTuple' (aka 'struct HeapTupleData *') > > Hmm, the initiali

Re: [PATCH] gcc warning 'expression which evaluates to zero treated as a null pointer'

2019-11-13 Thread Tom Lane
didier writes: > Trivial patch: > - remove a gcc warning (since commit 7a0574b5) > expression which evaluates to zero treated as a null pointer constant of > type 'HeapTuple' (aka 'struct HeapTupleData *') Hmm, the initializations "HeapTuple newtuple = false" are certainly bogus-looking and

[PATCH] gcc warning 'expression which evaluates to zero treated as a null pointer'

2019-11-13 Thread didier
Hi, Trivial patch: - remove a gcc warning (since commit 7a0574b5) expression which evaluates to zero treated as a null pointer constant of type 'HeapTuple' (aka 'struct HeapTupleData *') - always use "if (newtuple == NULL)" rather than mixing !newtuple and newtuple == NULL Regards Didier di