bugAVR C Runtime Library - Bugs: bug #49984, fabs missing from libm...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #49984: fabs missing from libm implementation.

Submitter:  Georg-Johann Lay <gjlayde>
Submitted:  Wed 04 Jan 2017 11:19:01 AM UTC
   
 
Category:  Library Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  None Assigned to:  None
Percent Complete:  0% Open/Closed:  Open
Release:  2.0.0 Fixed Release:  None

Wed 04 Jan 2017 11:21:21 AM UTC, comment #1: 

Some text has been thrown away by the web interface:

  • Linker error re. missing fabs implementation occurs of compiled with -ffreestanding or with -fno-builtin


  • Compiler error because of unknown key word "inline" occurrs in C90 mode.
Georg-Johann Lay <gjlayde>
Wed 04 Jan 2017 11:19:01 AM UTC, original submission:  

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 +verbatim+ use_fabs.o: In function `use_fabsf':

use_fabs.c:(.text+0x24): undefined reference to `fabs' -verbatim-

 __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 +verbatim+__inline__-verbatim-.

Georg-Johann Lay <gjlayde>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gjlayde (Submitted the item)
  •  

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.14-f13d.
    Corresponding source code