Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

ICC v11.1 build 064 incompatible with GCC 4,4,2 headers

Yuli_Fiterman
Beginner
446 Views

Command line output:

/usr/include/c++/4.4.2/cmath(500): error: identifier "__builtin_fpclassify" is undefined
return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL,
^
detected during:
instantiation of "__gnu_cxx::__enable_if<:__IS_ARITHMETIC><_Tp>::__value, int>::__type std::fpclassify(_Tp) [with _Tp=float]" at line 172 of "/usr/include/boost/functional/hash/detail/hash_float.hpp"
instantiation of "size_t={unsigned int} boost::hash_detail::float_hash_value(T) [with T=float]" at line 304 of "/usr/include/boost/functional/hash/hash.hpp"

Do you have a workaround for this? If not please do something about this because 4.4.2 and 4.4.3 now come standard on a lot of linux distributions/platforms.

0 Kudos
8 Replies
bsteintrc
Beginner
446 Views
I am having this issue as well, though with gcc 4.4.1 headers. Any solutions?
0 Kudos
pbkenned1
Employee
446 Views

It's just an issue with __builtin_fpclassify() not being supported. In general, gcc 4.4.x is supported by the 11.1 compilers. If you know of other incompatibilities, please report them.

DPD200149932 is the compiler engineering feature request for __builtin_fpclassify()

0 Kudos
bsteintrc
Beginner
446 Views
OK; but I'm using 11.1. "In general, it's supported, [but I guess not here]" just isn't enough in this case. Is there a workaround? Is there something I'm missing?
0 Kudos
pbkenned1
Employee
446 Views
The C++ product team is investigating this issue. If they find any workaround, I'll post it here. I doubt you're missing anything.
0 Kudos
bsteintrc
Beginner
446 Views
Any updates here?
0 Kudos
pbkenned1
Employee
446 Views

Yes, this issue is now planned to be fixed in an update of the 11.1 compiler. I will let you know when a compiler with the fix is available, and identify the version. The problem isa bitdifficult to fix and no workaround has yet been found.

0 Kudos
pbkenned1
Employee
446 Views
This issue is resolved with icc 11.1 update #7 (Package ID l_cproc_p_11.1.073)

$ icc -V

Intel C Compiler Professional for applications running on IA-32, Version 11.1 Build 20100806 Package ID: l_cproc_p_11.1.073

Copyright (C) 1985-2010 Intel Corporation. All rights reserved.

$ cat builtin_fpclassify.cpp

enum { FP_NAN, FP_INFINITE, FP_ZERO, FP_SUBNORMAL, FP_NORMAL };

inline void fpclassify(float f)

{

__builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL,

FP_SUBNORMAL, FP_ZERO, f);

}

$ icc -c builtin_fpclassify.cpp

$

Patrick Kennedy
Intel Developer Support

0 Kudos
bsteintrc
Beginner
446 Views
Fantastic news, thanks!
Good timing, too, since we were just revisiting this issue the other day. :)
0 Kudos
Reply