Re: Woo hoo ... a whole new set of compiler headaches!!

Lists: pgsql-hackers
From: "Dave Held" <dave(dot)held(at)arrayservicesgrp(dot)com>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Woo hoo ... a whole new set of compiler headaches!! :)
Date: 2005-04-22 14:09:59
Message-ID: 49E94D0CFCD4DB43AFBA928DDD20C8F9026184CA@asg002.asg.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

> -----Original Message-----
> From: Marc G. Fournier [mailto:scrappy(at)postgresql(dot)org]
> Sent: Friday, April 22, 2005 8:56 AM
> To: pgsql-hackers(at)postgresql(dot)org
> Subject: [HACKERS] Woo hoo ... a whole new set of compiler headaches!!
> :)
>
> GCC 4.0.0 has been released.
> [...]

I think that's great news! If the code is written in a conforming way,
I don't see why a new release would be a cause for headaches. And if
new compiler releases *are* a cause for headaches, it doesn't give me
great confidence in the codebase.

__
David B. Held
Software Engineer/Array Services Group
200 14th Ave. East, Sartell, MN 56377
320.534.3637 320.253.7800 800.752.8129


From: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
To: Dave Held <dave(dot)held(at)arrayservicesgrp(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Woo hoo ... a whole new set of compiler headaches!!
Date: 2005-04-22 14:46:04
Message-ID: 20050422114337.L1315@ganymede.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, 22 Apr 2005, Dave Held wrote:

>> -----Original Message-----
>> From: Marc G. Fournier [mailto:scrappy(at)postgresql(dot)org]
>> Sent: Friday, April 22, 2005 8:56 AM
>> To: pgsql-hackers(at)postgresql(dot)org
>> Subject: [HACKERS] Woo hoo ... a whole new set of compiler headaches!!
>> :)
>>
>> GCC 4.0.0 has been released.
>> [...]
>
> I think that's great news! If the code is written in a conforming way,
> I don't see why a new release would be a cause for headaches. And if
> new compiler releases *are* a cause for headaches, it doesn't give me
> great confidence in the codebase.

Actually, what I'm more "worried" about is the optimizations added to 4.x
... I know, for instance, that with FreeBSD's kernel, for the longest time
you couldn't use the higher optimizations in 3.x, since it would cause
"unexpected results" ...

With GCC 4.x, there are new optimizations, and a while new set of
"unknowns" that we're going to possibly get bug reports for ... and, it
*is* a .0 major release for GCC, so there are bound to be bugs in their
optimizer also, and I know there are some that will see "the latest and
greatest", install it and come flying at us when its possible that its a
bug in the newer GCC itself ...

----
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email: scrappy(at)hub(dot)org Yahoo!: yscrappy ICQ: 7615664


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
Cc: Dave Held <dave(dot)held(at)arrayservicesgrp(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Woo hoo ... a whole new set of compiler headaches!!
Date: 2005-04-22 14:58:59
Message-ID: 775.1114181939@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

"Marc G. Fournier" <scrappy(at)postgresql(dot)org> writes:
> With GCC 4.x, there are new optimizations, and a while new set of
> "unknowns" that we're going to possibly get bug reports for ... and, it
> *is* a .0 major release for GCC, so there are bound to be bugs in their
> optimizer also, and I know there are some that will see "the latest and
> greatest", install it and come flying at us when its possible that its a
> bug in the newer GCC itself ...

FWIW, Red Hat has been using gcc 4 for Fedora Core 4 builds for some
time, so I know that PG (8.0.* that is) builds and passes regression
tests on all seven RH-supported architectures. I have not yet dared
to look at what warning messages gcc4 may spit out though ;-) ...
I have heard that it's a great deal pickier than earlier releases.

[ As a comparison point: the recent gcc and glibc updates in FC4 did
break MySQL. ]

regards, tom lane


From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
Cc: Dave Held <dave(dot)held(at)arrayservicesgrp(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Woo hoo ... a whole new set of compiler headaches!!
Date: 2005-04-22 15:34:26
Message-ID: 20050422153426.GA21816@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, Apr 22, 2005 at 11:46:04AM -0300, Marc G. Fournier wrote:

> Actually, what I'm more "worried" about is the optimizations added to 4.x
> ... I know, for instance, that with FreeBSD's kernel, for the longest time
> you couldn't use the higher optimizations in 3.x, since it would cause
> "unexpected results" ...

For a long time, the Linux kernel was meant to be compiled with specific
versions of GCC, because some assembly code was written in such a way
that the specific bugs in that compiler version made it write the exact
code they needed. So a new GCC release would fix the bugs, therefore
breaking Linux; they had to create new, specially crafted buggy code to
account for the bugs in the new compiler ;-) I think nowadays
those issues are pretty much settled. (Not sure if you can compile the
Linux kernel with GCC 4 anyway.)

Maybe this was the issue with the FreeBSD kernel as well, I don't know.

I wonder if this new GCC release could allow us to examine the strict
aliasing issue again.

--
Alvaro Herrera (<alvherre[(at)]dcc(dot)uchile(dot)cl>)
"Amanece. (Ignacio Reyes)
El Cerro San Cristóbal me mira, cínicamente, con ojos de virgen"


From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Dave Held <dave(dot)held(at)arrayservicesgrp(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Woo hoo ... a whole new set of compiler headaches!!
Date: 2005-04-22 16:42:18
Message-ID: 4269296A.1010809@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

>
> I think that's great news! If the code is written in a conforming way,
> I don't see why a new release would be a cause for headaches. And if
> new compiler releases *are* a cause for headaches, it doesn't give me
> great confidence in the codebase.

Uhmmm that isn't always true. The switch from 2.x to 3.x was fairly
painful. Standards can change and do often.

Sincerely,

Joshua D. Drake

--
Your PostgreSQL solutions company - Command Prompt, Inc. 1.800.492.2240
PostgreSQL Replication, Consulting, Custom Programming, 24x7 support
Managed Services, Shared and Dedication Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/