Re: struct sockaddr_storage

2023-01-23 Thread Alejandro Colomar via Gcc
Hi Stefan, On 1/23/23 08:40, Stefan Puiu wrote: According to strict aliasing rules, if you declare a variable of type 'struct sockaddr_storage', that's what you get, and trying to access it later as some other sockaddr_8 is simply not legal. The compiler may assume those accesses can't happen,

Re: struct sockaddr_storage

2023-01-23 Thread Richard Biener via Gcc
On Mon, Jan 23, 2023 at 5:04 PM Alejandro Colomar via Gcc wrote: > > Hi Stefan, > > On 1/23/23 08:40, Stefan Puiu wrote: > According to strict aliasing rules, if you declare a variable of type > 'struct > sockaddr_storage', that's what you get, and trying to access it later as > >

Re: struct sockaddr_storage

2023-01-23 Thread Jakub Jelinek via Gcc
On Mon, Jan 23, 2023 at 05:03:00PM +0100, Alejandro Colomar via Gcc wrote: > Hi Stefan, > > On 1/23/23 08:40, Stefan Puiu wrote: > > > > > According to strict aliasing rules, if you declare a variable of type > > > > > 'struct > > > > > sockaddr_storage', that's what you get, and trying to access

Re: [PATCH 1/4] libbacktrace: change all pc related variables to uintptr_t

2023-01-23 Thread Björn Schäpers
Am 20.01.2023 um 23:25 schrieb Ian Lance Taylor: On Fri, Jan 20, 2023 at 2:54 AM Björn Schäpers wrote: From: Björn Schäpers It's the right thing to do, since the PC shouldn't go out of the uintptr_t domain, and in backtrace_pcinfo the pc is uintptr_t. This is a preparation for a following pa

Re: [PATCH 2/4] libbacktrace: detect executable path on windows

2023-01-23 Thread Ian Lance Taylor via Gcc
On Fri, Jan 20, 2023 at 2:56 AM Björn Schäpers wrote: > > From: Björn Schäpers > > This is actually needed so that libstdc++'s implementation > to be able to work on windows. > > Tested on x86_64-linux and i686-w64-mingw32. > > -- >8 -- > > * configure.ac: Add a check for windows.h. >