Re: BUG #7588: pgsql 9.1 incompatible with zlib 1.27 - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #7588: pgsql 9.1 incompatible with zlib 1.27
Date
Msg-id 17066.1349641593@sss.pgh.pa.us
Whole thread Raw
In response to BUG #7588: pgsql 9.1 incompatible with zlib 1.27  (draco@marino.st)
Responses Re: BUG #7588: pgsql 9.1 incompatible with zlib 1.27  (John Marino <draco@marino.st>)
Re: BUG #7588: pgsql 9.1 incompatible with zlib 1.27  (John Marino <draco@marino.st>)
List pgsql-bugs
John Marino <draco@marino.st> writes:
> Are you 100% sure that offsetof is evaluated at compile time?  Is this
> not part of section 6.6 that I quoted earlier?

My copy of C99 sayeth (in section 7.17)

               offsetof(type, member-designator)

       which expands to an integer  constant  expression  that  has
       type  size_t,  the value of which is the offset in bytes, to
       the structure member (designated by member-designator), from
       the  beginning  of  its structure (designated by type).

If your version of gcc isn't treating it as an integer constant
expression, you either have a bug in the compiler or a bug in your
version of <stddef.h>.  And I will say once more that we have not
encountered any other report of gcc having a problem with this code.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #7588: pgsql 9.1 incompatible with zlib 1.27
Next
From: John Marino
Date:
Subject: Re: BUG #7588: pgsql 9.1 incompatible with zlib 1.27