On 12/11/17 17:12, Tom Lane wrote:
> Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
>> On 12/11/17 16:45, Tom Lane wrote:
>>> (BTW, why is it that we can't fall back on the negative-width-bitfield
>>> trick for old g++?)
>
>> The complaint is
>> error: types may not be defined in 'sizeof' expressions
>
> Hmm, well, surely there's more than one way to do that; the sizeof
> is just a convenient way to wrap it in C. Wouldn't a typedef serve
> just as well?
Here is another attempt, which has the desired effect with the handful
of compilers I have available.
(With the recent changes to AllocSetContextCreate() using a static
assertion, the current state now breaks actual extensions written in C++
in some configurations, so this has become a bit of a must-fix for PG11.)
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services