Re: [Openvpn-devel] [PATCH] Don't deference type-punned pointers

2016-10-18 Thread Arne Schwabe
Am 28.09.16 um 13:08 schrieb Steffan Karger: > Fixes compiler warnings (undefined behavior) by making the copy explicit > to comply to strict aliasing rules. With newer GCC the old code could > actually lead to undefined behaviour. > I always considered this to be legal C. But if the spec says

Re: [Openvpn-devel] [PATCH] Don't deference type-punned pointers

2016-10-18 Thread David Sommerseth
On 28/09/16 13:08, Steffan Karger wrote: > Fixes compiler warnings (undefined behavior) by making the copy explicit > to comply to strict aliasing rules. With newer GCC the old code could > actually lead to undefined behaviour. > > See e.g. http://blog.regehr.org/archives/959. Hmm ... This is