Re: buildworld doesn't like -O2

From: <andy_at_splashground.de>
Date: 11 Dec 2003 13:20:10 -0000
des wrote _at_ Thu, 11 Dec 2003 14:02:31 +0100:
> Andreas Hauser <andy-freebsd_at_splashground.de> writes:
> > There is a qr about it
> > http://www.freebsd.org/cgi/query-pr.cgi?pr=55774
> > but it was closed by DES saying "Not a problem report".
> > I don't understand why [...]
> 
> Quoting from src/share/examples/etc/make.conf:
> 
> # CFLAGS controls the compiler settings used when compiling C code.
> # Note that optimization settings above -O (-O2, ...) are not recommended
> # or supported for compiling the world or the kernel - please revert any
> # nonstandard optimization settings to "-O" before submitting bug reports
> # to the developers.
> 
> Even if that weren't the case, PRs about a broken build are generally
> not welcome.  We have mailing lists for that.

I know that and i also understand that brocken
optimization levels of GCC have led to a lot of false reports.
But with the newer GCC versions much has improved.

And in this case, as far as i can see,
the code does violate the strict aliasing rules.

const char *rhost;
... (const void **)&rhost ...

You only have (bad) luck that with less
optimizations the compiler doesn't warn about it.
Or is that a wrong representation?


Andy
Received on Thu Dec 11 2003 - 04:20:12 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:33 UTC