Re: [Mesa-dev] [PATCH 2/7] gallium/auxiliary: Add u_bitcast.h header.

2016-08-10 Thread Matt Turner
On Thu, Jul 28, 2016 at 9:55 PM, Connor Abbott wrote: > On Thu, Jul 28, 2016 at 7:58 PM, Roland Scheidegger > wrote: >> Am 29.07.2016 um 00:35 schrieb Matt Turner: >>> --- >>> src/gallium/auxiliary/Makefile.sources | 1 + >>> src/gallium/auxiliary/util/u_bitcast.h | 57 >>> +++

Re: [Mesa-dev] [PATCH 2/7] gallium/auxiliary: Add u_bitcast.h header.

2016-07-29 Thread Marek Olšák
Reviewed-by: Marek Olšák Marek On Fri, Jul 29, 2016 at 12:35 AM, Matt Turner wrote: > --- > src/gallium/auxiliary/Makefile.sources | 1 + > src/gallium/auxiliary/util/u_bitcast.h | 57 > ++ > 2 files changed, 58 insertions(+) > create mode 100644 src/gallium/

Re: [Mesa-dev] [PATCH 2/7] gallium/auxiliary: Add u_bitcast.h header.

2016-07-29 Thread Roland Scheidegger
Ah you're right it is guaranteed by c99 and newer (who cares about c++ :-)). I was probably remembering some discussion for older c standards, where it might not have been guaranteed by the standard but all compilers would have honored the union aliasing anyway. But in any case I'm still fine wit

Re: [Mesa-dev] [PATCH 2/7] gallium/auxiliary: Add u_bitcast.h header.

2016-07-29 Thread Gustaw Smolarczyk
Is that really the case? I always thought that using union is one of the best ways to play it safe while not disabling strict aliasing rules. Here is an answer on stack overflow that uses this reasoning: http://stackoverflow.com/a/99010 Here is another site with an extract from C11 standard: http

Re: [Mesa-dev] [PATCH 2/7] gallium/auxiliary: Add u_bitcast.h header.

2016-07-29 Thread Roland Scheidegger
Am 29.07.2016 um 06:55 schrieb Connor Abbott: > On Thu, Jul 28, 2016 at 7:58 PM, Roland Scheidegger > wrote: >> Am 29.07.2016 um 00:35 schrieb Matt Turner: >>> --- >>> src/gallium/auxiliary/Makefile.sources | 1 + >>> src/gallium/auxiliary/util/u_bitcast.h | 57 >>>

Re: [Mesa-dev] [PATCH 2/7] gallium/auxiliary: Add u_bitcast.h header.

2016-07-28 Thread Connor Abbott
On Thu, Jul 28, 2016 at 7:58 PM, Roland Scheidegger wrote: > Am 29.07.2016 um 00:35 schrieb Matt Turner: >> --- >> src/gallium/auxiliary/Makefile.sources | 1 + >> src/gallium/auxiliary/util/u_bitcast.h | 57 >> ++ >> 2 files changed, 58 insertions(+) >> create

Re: [Mesa-dev] [PATCH 2/7] gallium/auxiliary: Add u_bitcast.h header.

2016-07-28 Thread Roland Scheidegger
Am 29.07.2016 um 00:35 schrieb Matt Turner: > --- > src/gallium/auxiliary/Makefile.sources | 1 + > src/gallium/auxiliary/util/u_bitcast.h | 57 > ++ > 2 files changed, 58 insertions(+) > create mode 100644 src/gallium/auxiliary/util/u_bitcast.h > > diff --git a

[Mesa-dev] [PATCH 2/7] gallium/auxiliary: Add u_bitcast.h header.

2016-07-28 Thread Matt Turner
--- src/gallium/auxiliary/Makefile.sources | 1 + src/gallium/auxiliary/util/u_bitcast.h | 57 ++ 2 files changed, 58 insertions(+) create mode 100644 src/gallium/auxiliary/util/u_bitcast.h diff --git a/src/gallium/auxiliary/Makefile.sources b/src/gallium/auxili