Use plain memset() in numeric.c, not MemSet and friends.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 8 Sep 2020 15:47:37 +0000 (11:47 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 8 Sep 2020 15:47:37 +0000 (11:47 -0400)
commit3438c988fd757c74ea4ddd80cdbb7405f4a1bc39
tree0f65b02cb12b7e9f375d9c414328c4a25fec2ec2
parent728d4bc16b79dea0dd6d540aa5c55a84ac722a09
Use plain memset() in numeric.c, not MemSet and friends.

This essentially reverts a micro-optimization I made years ago,
as part of the much larger commit d72f6c750.  It's doubtful
that there was any hard evidence for it being helpful even then,
and the case is even more dubious now that modern compilers
are so much smarter about inlining memset().

The proximate reason for undoing it is to get rid of the type punning
inherent in MemSet, for fear that that may cause problems now that
we're applying additional optimization switches to numeric.c.
At the very least this'll silence some warnings from a few old
buildfarm animals.

(It's probably past time for another look at whether MemSet is still
worth anything at all, but I do not propose to tackle that question
right now.)

Discussion: https://postgr.es/m/CAJ3gD9evtA_vBo+WMYMyT-u=keHX7-r8p2w7OSRfXf42LTwCZQ@mail.gmail.com
src/backend/utils/adt/numeric.c