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 19:44:48
Message-ID: 5071DBB0.8040107@marino.st
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 10/7/2012 21:14, Tom Lane wrote:
> John Marino<draco(at)marino(dot)st> writes:
>> By the way, I also had to patch 9.1.6 in order to build it with gcc47:
>> http://pkgsrc.se/files(dot)php?messageId=20121007102454(dot)6E70D175DD(at)cvs(dot)netbsd(dot)org
>
> [ shrug... ] I just tried 9.1.6 with gcc 4.7.0 and 4.7.2 on Fedora, and
> saw nothing but a handful of cosmetic warnings. I see the same on our
> buildfarm member anchovy, which is running 4.7.1 on Arch Linux.
>
> We generally don't bother to fix cosmetic warnings introduced by new
> toolchains except in HEAD; it's just not worth the trouble. gcc in
> particular seems to move the goalposts constantly, and most of the
> warnings they've introduced recently are pure pedantry anyway (IMO).
>
> The comments attached to your patches suggest that you saw errors rather
> than warnings, but if so you've got distro-specific compiler bugs to
> deal with. There is nothing even faintly non-legitimate about the code
> chunks you changed.
>
> regards, tom lane

Hi Tom,
Perhaps, you need to take a closer look at this. I guarantee that I
didn't do this for cosmetic reasons. GCC behavior changed with GCC 4.5
on this topic.

From what I can tell, later version GCC does not consider these arrays
declared with a constant expression. Apparently it runs afoul of C99
section 6.6:
http://c0x.coding-guidelines.com/6.6.html

Things like sizeof, offsetof, etc in cause problems.

I don't know why you didn't reproduce it in Fedora. I can speculate
that Fedora has modified gcc from a stock vendor configuration or
perhaps changes the internal specs. Surely this isn't the first time
the topic has been brought up? I'm surprised.

The errors were coming something like, "variably modified at file
scope". One was a warning, two were errors that broke the compilation.

John

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2012-10-07 19:54:13 Re: BUG #7588: pgsql 9.1 incompatible with zlib 1.27
Previous Message Tom Lane 2012-10-07 19:14:54 Re: BUG #7588: pgsql 9.1 incompatible with zlib 1.27