Quantcast
Channel: Intel® Software - Intel® C++ Compiler
Viewing all articles
Browse latest Browse all 1175

ICC 17.0.4 + GCC 7 + glibc 2.26: error: identifier "_Float128" is undefined

$
0
0

I realize that ICC 17 is not meant to be used in combination with GCC 7 + glibc 2.26 since those are very recent releases and might be considered unsupported, but the following problem surfaced after the release of glibc 2.26:

#include <stdlib.h>

icc -D_GNU_SOURCE -o foo foo.c
In file included from foo.c(2):
/usr/include/stdlib.h(133): error: identifier "_Float128" is undefined
 extern _Float128 strtof128 (const char *__restrict __nptr,
        ^

In file included from foo.c(2):
/usr/include/stdlib.h(190): error: identifier "_Float128" is undefined
                       _Float128 __f)
                       ^

In file included from foo.c(2):
/usr/include/stdlib.h(236): error: identifier "_Float128" is undefined
 extern _Float128 strtof128_l (const char *__restrict __nptr,
        ^

compilation aborted for foo.c (code 2)

I believe this problem appears because of the following lines in floatn.h (included with glibc 2.26):

/* The type _Float128 exists only since GCC 7.0.  */
# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
typedef __float128 _Float128;
# endif
 

Because ICC defines __GNUC__ and __GNUC__MINOR__ to the same versions which are defined by GCC itself this typedef is not visible when GCC 7 is used as a backend. I believe GCC 7+ supports _Float128 natively (https://gcc.gnu.org/gcc-7/changes.html) and ICC should probably do so too, hopefully in one of the next releases.


Viewing all articles
Browse latest Browse all 1175

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>