avr-libc-dev
[Top][All Lists]
Advanced

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

[avr-libc-dev] [bug #49984] fabs missing from libm implementation.


From: Georg-Johann Lay
Subject: [avr-libc-dev] [bug #49984] fabs missing from libm implementation.
Date: Wed, 4 Jan 2017 11:19:02 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0

URL:
  <http://savannah.nongnu.org/bugs/?49984>

                 Summary: fabs missing from libm implementation.
                 Project: AVR C Runtime Library
            Submitted by: gjlayde
            Submitted on: Wed 04 Jan 2017 11:19:01 AM GMT
                Category: Library
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
        Percent Complete: 0%
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 2.0.0
           Fixed Release: None

    _______________________________________________________

Details:

fabs is missing from the libm implementation:


#include <math.h>

float use_fabsf (float x)
{
    return fabsf (x);
}

double use_fabs (double x)
{
    return fabs (x);
}

int main (void) { return 0; }


* Compiling with -ffreestanding or with -fno-builtin will run against a linker
error  use_fabs.o: In function `use_fabsf':
use_fabs.c:(.text+0x24): undefined reference to `fabs' 
* Compiling with -std=c90 will run into "inline", which is not available in
C90:  avr/include/math.h:341:42: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'int'
 __ATTR_CONST__ static inline int isfinite (double __x)
                                          ^~~
/srv/local/gnu/install/gcc-6/avr/include/math.h:359:42: error: expected '=',
',', ';', 'asm' or '__attribute__' before 'double'
 __ATTR_CONST__ static inline double copysign (double __x, double __y)


"inline" should be replaced by __inline__.





    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?49984>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]