- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have the following code that compiles with g++ (4.3.2) without any warning and runs smoothly with "-ansi -pedantic -Wall". But it does not compile with Intel C++ compiler (icc, v10.1). It again worked without issues on v11. The following is the code:
The same program worked with v11 without any issues. I guess there is a bug in v10.1 which seems to have been fixed. (The post is here only to report a possible bug or correct myself of some subtle mistake(s).)
TIA,
-S
I have the following code that compiles with g++ (4.3.2) without any warning and runs smoothly with "-ansi -pedantic -Wall". But it does not compile with Intel C++ compiler (icc, v10.1). It again worked without issues on v11. The following is the code:
[cpp]#includeThe error with icc (v10.1) was:using namespace std; class Add { private: int dx; public: Add() : dx(0) {} Add(int _dx) : dx(_dx) {} int operator() (int n) { return n+dx; } int dee_x(int n, int tx) { return n+tx; } }; int main() { Add add_0; Add add_5(5); cout << add_0(100) << endl; cout << add_5(100) << endl; cout << add_0.dee_x(100,5) << endl; return 0; } [/cpp]
[cpp]/usr/include/c++/4.3.2/bits/char_traits.h(266): error: identifier "__builtin_memchr" is undefined { return static_cast(__builtin_memchr(__s, __a, __n)); } ^ /usr/include/c++/4.3.2/bits/char_traits.h(270): error: identifier "__builtin_memmove" is undefined { return static_cast (__builtin_memmove(__s1, __s2, __n)); } ^ /usr/include/c++/4.3.2/bits/allocator.h(143): error: identifier "__is_empty" is undefined template ^ /usr/include/c++/4.3.2/bits/allocator.h(143): error: function call is not allowed in a constant expression template ^ /usr/include/c++/4.3.2/bits/allocator.h(143): error: type name is not allowed template ^ /usr/include/c++/4.3.2/bits/allocator.h(160): error: identifier "__is_empty" is undefined template ^ /usr/include/c++/4.3.2/bits/allocator.h(160): error: function call is not allowed in a constant expression template ^ /usr/include/c++/4.3.2/bits/allocator.h(160): error: type name is not allowed template ^ /usr/include/c++/4.3.2/bits/locale_facets.tcc(1284): error: class "std::ctype_byname " is not an entity that can be instantiated extern template class ctype_byname ; ^ /usr/include/c++/4.3.2/bits/locale_facets.tcc(1319): error: class "std::ctype_byname " is not an entity that can be instantiated extern template class ctype_byname ; ^ compilation aborted for function_objects.cpp (code 2)[/cpp]
The same program worked with v11 without any issues. I guess there is a bug in v10.1 which seems to have been fixed. (The post is here only to report a possible bug or correct myself of some subtle mistake(s).)
TIA,
-S
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
icc 11 has better compatibility with g++ 4.3 headers than icc 10.1 did. I think you'll find that icc 10.1 didn't claim to support such recent versions of gcc. 11.1 should be out in a week or two, and it fixes some more incompatibilities with current g++.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - tim18
icc 11 has better compatibility with g++ 4.3 headers than icc 10.1 did. I think you'll find that icc 10.1 didn't claim to support such recent versions of gcc. 11.1 should be out in a week or two, and it fixes some more incompatibilities with current g++.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm having the same problem, but I think we only have a license for version version 10. Is there a good workaround to this problem? I've tried reverting to an earlier g++ compiler, but so far that just causes different error messages.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What can i do if my PC is cannot work with icc-11 (i not have sse2, only sse) ?
Added:
Also, i want to say that program from post #1 compile fine with 10.1 in my system (Gentoo)
Added:
Also, i want to say that program from post #1 compile fine with 10.1 in my system (Gentoo)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - solunskiy.mitya
What can i do if my PC is cannot work with icc-11 (i not have sse2, only sse) ?
Added:
Also, i want to say that program from post #1 compile fine with 10.1 in my system (Gentoo)
Added:
Also, i want to say that program from post #1 compile fine with 10.1 in my system (Gentoo)

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page