[prev in list] [next in list] [prev in thread] [next in thread] 

List:       uclibc
Subject:    Confused by the <fenv> implementation, causing gsl build issues
From:       dalias () aerifal ! cx (Rich Felker)
Date:       2012-10-19 18:07:47
Message-ID: 20121019180747.GP254 () brightrain ! aerifal ! cx
[Download RAW message or body]

On Sun, Oct 14, 2012 at 12:04:29PM +0200, Thomas Petazzoni wrote:
> Hello,
> 
> uClibc provides a UCLIBC_HAS_FENV option that can be enabled on any
> architecture. As soon as this option is enabled, the <fenv.h> header is
> included, which make applications and libraries think that function
> such as feenableexcept() or fesetround() are available. However, on
> ARM, those function are in fact not implemented by uClibc.

The functions should always be implemented, possibly as no-ops if the
arch does not support exceptions or rounding modes (in which case 0 is
the only argument to them that does not invoke UB). The presence of
the macro definitions for each exception and rounding mode are the
standards-conformant way to indicate to applications which features
are available; all of them except FE_TONEAREST (==0) should be left
undefined on archs with no fpu.

Rich

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic