This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: C99 anomolies... ?


On Aug 26 17:43, Joel Sherrill wrote:
> On 8/26/2014 5:30 PM, DJ Delorie wrote:
> > As part of our internal testing I found a few bits of newlib that
> > don't seem to be "right" with C99, enough to cause problems with the
> > testing framework.  Comments?
> >
> > llabs / lldiv
> >
> > 	Official as of C99, but in stdlib.h they're still #ifndef
> > 	__STRICT_ANSI__.  There are #tests for C90 and C++11
> > 	declarations elsewhere, is anyone working on #tests for C99?
> > 	Or is newlib still officially just C90?
> In general terms, the RTEMS community has been trying to fix some of the
> OS level guards but on no specific timetable. We had Google Code In students
> help add the restrict keyword which is C99. Personally, I think adding the
> C99 and C++11 guards is important.
> 
> My rule has been that if I fix a file for something, it has to be fixed
> for all
> of that pattern.
> 
> Unfortunately, I don't think there is a master tracking sheet of what files
> have had what reviews/updates done yet.

No, there isn't.  Please feel free to send patches.

> > <math.h>
> >
> > 	has:
> > 	 extern long double frexpl _PARAMS((long double value, int *));
> > 	but the "value" part is problematic.  Should be:
> > 	 extern long double frexpl _PARAMS((long double, int *));
> > 	Looks like the only case of this in <math.h>
> Fix it. :)

Same here.

> > nexttoward
> > nexttowardf
> > nexttowardl
> >
> > 	any plans to add these?
> Not from the RTEMS side.
> 
> This is an unfortunately long list of some of the things I found missing
> a couple of years ago when I compared RTEMS+newlib to the Open
> Group FACE General Purpose POSIX Profile. These may be POSIX or
> C99, I didn't investigate that:
> 
> cabsl cacoshl cacosl cargl casinhl casinl catanhl catanl ccoshl ccosl
>   cexpl cimagl clogl conjl cpowl cprojl creall csinhl csinl csqrtl
>   ctanhl ctanl log2l logbl

In fact, except on systems with long double == double, none of the
long double functions is available in newlib.

Marco Atzeri (CCed) included the complex functions in 2010 and showed
some interest in adding long double functionality to newlib.  Marco,
do you still have something in the loop?

> nexttoward nexttowardf nexttowardl

Don't exist at all.

> feclearexcept fegetenv fegetexceptflag fegetround feholdexcept
>    feraiseexcept fesetenv fesetexceptflag fesetround fetestexcept
>    feupdateenv

Exist in Cygwin but not generically in newlib.  Aren't these functions
target specifc?  At least the Cygwin functions are calling x86 assembler
code...

> imaxabs imaxdiv
> strtoimax strtoumax
> wcstoimax wcstoumax

In Cygwin these functions are simply mapped to

  llabs lldiv
  strtoll strtoull
  wcstoll wcstoull

We could do this generically in newlib along the lines of

  HAVE_LONG_LONG ? map to long long function : map to long function

> No idea what to do about those.

Uhm... send patches?


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

Attachment: pgpg_1LGN5X8f.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]