Re: [PATCH util/macros] Drop -fno-strict-aliasing from XORG_CWARNFLAGS

2017-12-14 Thread Peter Harris
On 2017-12-14 11:35 AM, Michel Dänzer wrote:
> I don't think compilers can reliably warn about all strict aliasing
> violations yet (ever?).
> 
> Is this really worth the risk? Do you have any numbers showing tangible
> benefits of this change?

The main benefit is in code cleanliness, not necessarily performance.

The risk if we don't make this change is to those of us with non-gcc
compilers (that don't have -fno-strict-aliasing or an equivalent as an
option). Replacing -fno-strict-aliasing with -Werror=strict-aliasing is
a step in the right direction.

Peter Harris
-- 
   Open Text Connectivity Solutions Group
Peter Harrishttp://connectivity.opentext.com/
Research and DevelopmentPhone: +1 905 762 6001
phar...@opentext.comToll Free: 1 877 359 4866
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH util/macros] Drop -fno-strict-aliasing from XORG_CWARNFLAGS

2017-12-14 Thread Michel Dänzer
On 2017-12-13 08:47 PM, Adam Jackson wrote:
> On Wed, 2017-12-13 at 11:31 -0800, Keith Packard wrote:
>> Adam Jackson  writes:
>>
>>> This has been "deprecated" since 2011, but because it is still
>>> referenced from XORG_DEFAULT_OPTIONS nothing has ever been updated to
>>> get strict aliasing right. Let's fix that.
>>
>> I don't understand this -- are you getting rid of this option from our
>> compiles or not?
> 
> I mean, the lines in the diff start with "-".  "Let's fix that" here
> means "let's build normally and see what falls out".
> 
>> I can assure you that our code is unlikely to work with
>> out it.
> 
> xserver still passes make check when built without it. Well, the meson
> build does anyway, I haven't gotten around to trying it with the
> autotools build yet, nor adding -Werror=strict-aliasing and rebuilding
> the world, but that would obviously be prerequisite for releasing a
> version of util-macros with this change in it.

I don't think compilers can reliably warn about all strict aliasing
violations yet (ever?).

Is this really worth the risk? Do you have any numbers showing tangible
benefits of this change?


-- 
Earthling Michel Dänzer   |   http://www.amd.com
Libre software enthusiast | Mesa and X developer
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH util/macros] Drop -fno-strict-aliasing from XORG_CWARNFLAGS

2017-12-13 Thread Adam Jackson
On Wed, 2017-12-13 at 11:31 -0800, Keith Packard wrote:
> Adam Jackson  writes:
> 
> > This has been "deprecated" since 2011, but because it is still
> > referenced from XORG_DEFAULT_OPTIONS nothing has ever been updated to
> > get strict aliasing right. Let's fix that.
> 
> I don't understand this -- are you getting rid of this option from our
> compiles or not?

I mean, the lines in the diff start with "-".  "Let's fix that" here
means "let's build normally and see what falls out".

> I can assure you that our code is unlikely to work with
> out it.

xserver still passes make check when built without it. Well, the meson
build does anyway, I haven't gotten around to trying it with the
autotools build yet, nor adding -Werror=strict-aliasing and rebuilding
the world, but that would obviously be prerequisite for releasing a
version of util-macros with this change in it.

- ajax
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH util/macros] Drop -fno-strict-aliasing from XORG_CWARNFLAGS

2017-12-13 Thread Keith Packard
Adam Jackson  writes:

> This has been "deprecated" since 2011, but because it is still
> referenced from XORG_DEFAULT_OPTIONS nothing has ever been updated to
> get strict aliasing right. Let's fix that.

I don't understand this -- are you getting rid of this option from our
compiles or not? I can assure you that our code is unlikely to work with
out it.

-- 
-keith


signature.asc
Description: PGP signature
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel