Re: BUG #7588: pgsql 9.1 incompatible with zlib 1.27

From: John Marino <draco(at)marino(dot)st>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #7588: pgsql 9.1 incompatible with zlib 1.27
Date: 2012-10-07 20:54:35
Message-ID: 5071EC0B.1060207@marino.st
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 10/7/2012 22:26, Tom Lane wrote:
> John Marino<draco(at)marino(dot)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

Thanks Tom.
It is possible the culprit is the offsetof expansion. I'm examining the
FreeBSD version and there's a slight difference from that. I will
investigate this further and pass on what I find out. I don't suspect
the compiler though -- I've seen this on multiple compilers in the last
few months, namely a stock gcc 4.6 as well. It also choked on offsetof.

Regards,
John

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message John Marino 2012-10-07 22:08:04 Re: BUG #7588: pgsql 9.1 incompatible with zlib 1.27
Previous Message Tom Lane 2012-10-07 20:26:33 Re: BUG #7588: pgsql 9.1 incompatible with zlib 1.27