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

From John Marino
Subject Re: BUG #7588: pgsql 9.1 incompatible with zlib 1.27
Date
Msg-id 5071DBB0.8040107@marino.st
Whole thread Raw
In response to Re: BUG #7588: pgsql 9.1 incompatible with zlib 1.27  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On 10/7/2012 21:14, Tom Lane wrote:
> John Marino<draco@marino.st>  writes:
>> By the way, I also had to patch 9.1.6 in order to build it with gcc47:
>> http://pkgsrc.se/files.php?messageId=20121007102454.6E70D175DD@cvs.netbsd.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

pgsql-bugs by date:

Previous
From: John Marino
Date:
Subject: Re: BUG #7588: pgsql 9.1 incompatible with zlib 1.27
Next
From: Franco Ricci
Date:
Subject: Re: BUG #7586: PL/Perl problem