- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The following C++ code should be complied and run under Linux.
The program should stay in the while(1) loop forever.
With g++ it does, but compiled with icpc it does not !
Probably a bug in the icc compiler ?!
Please can anyone of you try to compile the main.cpp below?
The program needs a string as argument.
$ icpc main.cpp
$ ./a.out test
-> program ends, but it should run forever !!
WHY ??
=================== CODE ==================
#include <stdio.h>
#include <iostream>
#include <string>
#include <map>using namespace std;int main(int argc, char *argv[])
{
map<string,string> m;
m["aa"] = argv[1];
while(1)
{
if (m.size() == 0)
{
cout<<"m.size():"<<m.size()<<endl;
break;
}
}
return 0;
}
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was notified that this issue has been fixed in Composer XE 2013 Update 4. You may download it at https://registrationcenter.intel.com. FYI.
Feilong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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