• Tom Lane's avatar
    Try to fix portability issue in enum renumbering (again). · 65a588b4
    Tom Lane authored
    The hack embodied in commit 4ba61a48 no longer works after today's change
    to allow DatumGetFloat4/Float4GetDatum to be inlined (commit 14cca1bf).
    Probably what's happening is that the faulty compilers are deciding that
    the now-inlined assignment is a no-op and so they're not required to
    round to float4 width.
    
    We had a bunch of similar issues earlier this year in the degree-based
    trig functions, and eventually settled on using volatile intermediate
    variables as the least ugly method of forcing recalcitrant compilers
    to do what the C standard says (cf commit 82311bcd).  Let's see if
    that method works here.
    
    Discussion: <4640.1472664476@sss.pgh.pa.us>
    65a588b4
pg_enum.c 14.7 KB