strict aliasing and socket structures
Andrew Haley
aph@redhat.com
Mon Feb 20 17:46:00 GMT 2017
On 20/02/17 17:38, Abhinav Gauniyal wrote:
>> OK, so you either don't have the skills or don't have the time to tell
>> us what the actual types are?
>
> I just told you the types, these are the structures defined in <netinet/in.h>
> header, sockaddr_storage, sockaddr_in, sockaddr_in6, sockaddr_un and
> sockaddr. I even sent a sample program demonstrating it and an online
> execution of it which clearly shows the warning.
>
> What do you mean by not having skills or time here? I've clearly demonstrated
> the problem, provided a minimal example and my original mail discusses this
> into depth. Can you be more specific about the details you want?
Yes. Something like
typedef struct sockaddr_storage {
field1...;
field2...;
};
typedef struct sockaddr_in {
...
etc.
You can get these by using "gcc --save-temps".
The we can have a look. Of course, we could do this for you, but if you
want help from us you should be prepared to do some work.
Andrew.
More information about the Gcc-help
mailing list