delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2008/09/26/18:26:48

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
X-Recipient: djgpp-workers AT delorie DOT com
Message-ID: <48DD618D.3010503@iki.fi>
Date: Sat, 27 Sep 2008 01:26:21 +0300
From: Andris Pavenis <andris DOT pavenis AT iki DOT fi>
User-Agent: Thunderbird 2.0.0.16 (X11/20080723)
MIME-Version: 1.0
To: djgpp-workers AT delorie DOT com
Subject: Re: Fix for "dereferencing type-punned pointer will break strict-aliasing
rules" error
References: <000501c92010$b9297fc0$2202a8c0 AT computername>
In-Reply-To: <000501c92010$b9297fc0$2202a8c0@computername>
Reply-To: djgpp-workers AT delorie DOT com

Juan Manuel Guerrero wrote:
> While I was trying to compile djgpp sources from the CVS tree with gcc 4.3.2,
> a couple of warnings like this:
> 
> gcc ... -c ef_scalb.c
> cc1.exe: warnings being treated as errors
> ef_scalb.c: In function '__ieee754_scalbf':
> ef_scalb.c:46: error: dereferencing type-punned pointer will break strict-aliasing rules
> 
> appeared.  The value to pass to the macros finitef, isnanf, etc. must be the
> long type union member and not float type one to fix this issue.

Committed earlier discussed patch for sys/djtypes.h and ieeefp.h which workarounds
type punning warnings.

Andris

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019