Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TKz1B-0006qj-FF for pgsql-bugs@postgresql.org; Sun, 07 Oct 2012 22:08:13 +0000 Received: from mail.synsport.com ([208.69.230.148] helo=shepard.synsport.net) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TKz17-0005qs-9k for pgsql-bugs@postgresql.org; Sun, 07 Oct 2012 22:08:12 +0000 Received: from [192.168.1.12] (134.red-88-9-108.dynamicip.rima-tde.net [88.9.108.134]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by shepard.synsport.net (Postfix) with ESMTP id 13FA5435A3; Sun, 7 Oct 2012 17:08:05 -0500 (CDT) Message-ID: <5071FD44.7060907@marino.st> Date: Mon, 08 Oct 2012 00:08:04 +0200 From: John Marino User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0) Gecko/20120129 Thunderbird/10.0 MIME-Version: 1.0 To: Tom Lane CC: pgsql-bugs@postgresql.org Subject: Re: BUG #7588: pgsql 9.1 incompatible with zlib 1.27 References: <13048.1349627764@sss.pgh.pa.us> <5071B902.6030505@marino.st> <14190.1349631338@sss.pgh.pa.us> <5071C248.5020206@marino.st> <15810.1349637294@sss.pgh.pa.us> <5071DBB0.8040107@marino.st> <16476.1349639653@sss.pgh.pa.us> <5071E0C8.40205@marino.st> <17066.1349641593@sss.pgh.pa.us> In-Reply-To: <17066.1349641593@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201210/54 X-Sequence-Number: 34354 On 10/7/2012 22:26, Tom Lane wrote: > John Marino 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. 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 Final follow-up: The culprit was indeed an older offsetof macro. I've committed a fix to the trunk of DragonFly: http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/262e0d745238888fc693cd80f79c7ac0c513769f Using the GCC builtin version of offsetof allows Postgresql 9.1.6 to build without the recently added patches. I'm going to revert that commit as well. Thanks for the pointers, Tom! John