Re: Back branches vs. gcc 4.8.0 - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Back branches vs. gcc 4.8.0
Date
Msg-id 1365212710.20916.4.camel@vanquo.pezone.net
Whole thread Raw
In response to Back branches vs. gcc 4.8.0  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Back branches vs. gcc 4.8.0
List pgsql-hackers
On Fri, 2013-04-05 at 18:14 -0400, Tom Lane wrote:
> Since gcc 4.8 is going to be on a lot of people's machines pretty
> soon,
> I think we need to do something to prevent it from breaking 8.4.x and
> 9.0.x.  It looks like our choices are (1) teach configure to enable
> -fno-aggressive-loop-optimizations if the compiler recognizes it,
> or (2) back-port commit 8137f2c32322c624e0431fac1621e8e9315202f9. 

Using a fixed-size struct member as a flexible one has always been a
violation of the C standard, although a widely tolerated one.  Doing
that in the middle of a struct, however, is totally wrong, and the
compiler is perfectly in its right to make a mess of it.  Even flexible
array members are not allowed in the middle of a struct.

So I think this is not a compiler bug or an arms race.  We just need to
fix the code.  So I'm in favor of backporting.





pgsql-hackers by date:

Previous
From: Jaime Casanova
Date:
Subject: Re: corrupt pages detected by enabling checksums
Next
From: Peter Eisentraut
Date:
Subject: Re: Back branches vs. gcc 4.8.0