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/


_______________________________________________
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev

Reply via email to