[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/5] Makeconf: add -fno-strict-aliasing to CFLAGS

From: Thomas Schwinge
Subject: Re: [PATCH 1/5] Makeconf: add -fno-strict-aliasing to CFLAGS
Date: Fri, 25 Oct 2013 15:09:48 +0200
User-agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/23.4.1 (i486-pc-linux-gnu)


On Fri, 25 Oct 2013 10:30:20 +0200, Justus Winter 
<4winter@informatik.uni-hamburg.de> wrote:
> If gcc is used with optimizations -O2, -O3, or -Os, it will enable
> optimizations that assume that pointers of different type do not
> alias, i.e. point to the same address. However, we use this a lot,
> e.g. in code using libports.
> Add -fno-strict-aliasing to CFLAGS to disable optimizations based on
> the strict aliasing rule.
> * Makeconf: Add -fno-strict-aliasing to CFLAGS.

<http://www.gnu.org/software/hurd/open_issues/strict_aliasing.html>.  So,
generally OK, but please, at the same time, revert my commit
c856c99d06a20a4a69eba4c044144384d87f3142 (pfinet only,
<https://savannah.gnu.org/bugs/?17124>), and move the comment from
pfinet/Makefile, or add a more appropriate comment to Makeconf.

> --- a/Makeconf
> +++ b/Makeconf
> @@ -80,6 +80,7 @@ CPPFLAGS += $(INCLUDES) \
>           $($*-CPPFLAGS)
>  CFLAGS += -std=gnu99 $(gnu89-inline-CFLAGS) -Wall -g -O3 \
> +         -fno-strict-aliasing \
>           $($*-CFLAGS)

So it's still possible to override with $*-CFLAGS, if desired.

I had once been working on MIG changes (also primarily for having it emit
const where appropriate -- will get rid of a lot of warnings in glibc,
for example).  Have to resume that at some point...  Yeah...


Attachment: pgpEEOrKa5si8.pgp
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]