Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support all IEC 60559 types (_Float{32,64,128},_Float{32,64,128}x) #52

Closed
trofi opened this issue May 20, 2018 · 0 comments
Closed

Support all IEC 60559 types (_Float{32,64,128},_Float{32,64,128}x) #52

trofi opened this issue May 20, 2018 · 0 comments

Comments

@trofi
Copy link

trofi commented May 20, 2018

Hackage's ncurses-0.2.16 package fails to build against ncurses-6.1 C library as it now defines references to _Float32 and _Float64. The c2hs fails to built ncurses as:

c2hs: C header contains errors:

/usr/include/wchar.h:396: (column 17) [ERROR]  >>> Syntax error !
  The symbol `wcstof32' does not fit here.

/usr/include/wchar.h contents are:

#ifdef __USE_ISOC99
/* Likewise for `float' and `long double' sizes of floating-point numbers.  */
extern float wcstof (const wchar_t *__restrict __nptr,
                     wchar_t **__restrict __endptr) __THROW;
extern long double wcstold (const wchar_t *__restrict __nptr,
                            wchar_t **__restrict __endptr) __THROW;
#endif /* C99 */

/* Likewise for `_FloatN' and `_FloatNx' when support is enabled.  */

#if __HAVE_FLOAT16 && defined __USE_GNU
extern _Float16 wcstof16 (const wchar_t *__restrict __nptr,
                          wchar_t **__restrict __endptr) __THROW;
#endif

#if __HAVE_FLOAT32 && defined __USE_GNU
extern _Float32 wcstof32 (const wchar_t *__restrict __nptr,
                          wchar_t **__restrict __endptr) __THROW;
#endif

#if __HAVE_FLOAT64 && defined __USE_GNU
extern _Float64 wcstof64 (const wchar_t *__restrict __nptr,
                          wchar_t **__restrict __endptr) __THROW;
#endif

#if __HAVE_FLOAT128 && defined __USE_GNU
extern _Float128 wcstof128 (const wchar_t *__restrict __nptr,
                            wchar_t **__restrict __endptr) __THROW;
#endif

#if __HAVE_FLOAT32X && defined __USE_GNU
extern _Float32x wcstof32x (const wchar_t *__restrict __nptr,
                            wchar_t **__restrict __endptr) __THROW;
#endif

#if __HAVE_FLOAT64X && defined __USE_GNU
extern _Float64x wcstof64x (const wchar_t *__restrict __nptr,
                            wchar_t **__restrict __endptr) __THROW;
#endif

#if __HAVE_FLOAT128X && defined __USE_GNU
extern _Float128x wcstof128x (const wchar_t *__restrict __nptr,
                              wchar_t **__restrict __endptr) __THROW;
#endif

To clarify: gcc-8.1.0 directly supports the following types: _Float{32,64,128}, _Float{32,64,128}x (they are not typedef aliases of other types from syntax standpoint).

@visq visq changed the title Lack of _Float32 support Support all IEC 60559 types (_Float{32,64,128}x?) May 22, 2018
@visq visq changed the title Support all IEC 60559 types (_Float{32,64,128}x?) Support all IEC 60559 types (_Float{32,64,128},_Float{32,64,128}x) May 22, 2018
@visq visq closed this as completed in d2052d5 Jun 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant