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: Joerg Sonnenberger <joerg%britannica.bec.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:42:39 +0200

 On Sat, Aug 20, 2011 at 01:35:03PM +0000, Kai-Uwe Eckhardt wrote:
 >  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 */
 >  };
 
 This is perfectly legal. The GCC behavior is a huge painful bug.
 
 Joerg
 


Home | Main Index | Thread Index | Old Index