pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/45278: bootstrap fails in libfetch NetBSD -current (gcc4.5)



The following reply was made to PR pkg/45278; it has been noted by GNATS.

From: "Kai-Uwe Eckhardt" <kuehro%gmx.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: pkg/45278: bootstrap fails in libfetch NetBSD -current (gcc4.5)
Date: Sat, 20 Aug 2011 15:33:47 +0200

 Taking a closer look at the referenced structure reveals that there is
 actually illegal code in /src/sys/netinet6/in6.h as the standard
 forbids the three union members to alias. gcc -O2 sets -fstrict-aliasing
 and bingo. I cannot test it right now, but -fno-strict-aliasing or a
 __attribute__((__might_alias__)) could solve this. Referencing __u6_addr8
 directly would only work on NetBSD but not on other systems.  
 
 
 struct in6_addr {
        union {
                __uint8_t   __u6_addr8[16];
                __uint16_t  __u6_addr16[8];
                uint32_t  __u6_addr32[4];
        } __u6_addr;                    /* 128-bit IP6 address */
 };
 
 
 -- 
 -- 
 
 


Home | Main Index | Thread Index | Old Index