- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm running into a problem with update2 of the C++ compiler on Linux. I have code that looks like this, it uses boost/foreach.
typedef element* element_ptr; typedef listelement_set; class foo { element_set find(const char*); } foreach (element* e, foo->find("/xyz")) { }
When compiling this code I get:
src/M6Server.cpp(361) (col. 3): internal error: assertion failed at: "shared/cfe/edgglue/edg_eh_n.c", line 234
I can work around this error by using:
element_set es(foo->find("/xyz")); foreach (element* e, es) { ... }
but that's not as elegant in my eyes.
Related to this, is there any news on when will the Intel compilers support the new range based for loop so I can drop using boost foreach?
Thansk,
-maarten hekkelman
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think you're going to have to fill in more of the missing pieces here.
I tried to recreate the problem (below) butdidn't see the assertion. Note that I changed foreach to BOOST_FOREACH because foreach didn't compile for me.
The easiest thing to do might be to createa preprocessed file (using -E or -P) and attach it...
sptxl8-167> cat t.cpp
#include
#include
using namespace boost;
using namespace boost::foreach;
using namespace std;
struct element {
~element() {;}
};
typedef element* element_ptr;
typedef list
struct F {
element_set find(const char*);
~F();
};
int main() {
F* foo = new F;
//foreach(element* e, foo->find("/xyz"))
BOOST_FOREACH(element* e, foo->find("/xyz") )
{
}
return 0;
}
sptxl8-168> icpc -I. -c t.cpp
sptxl8-169>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Judith,
Thanks for your reply. It took some time, but I reduced the problem to the following code.
-maarten
#include
#include
#include
struct element;
typedef std::list
struct element
{
element_set find(const std::string& path) const;
};
element* e;
void handle_entry()
{
foreach (element* link, e->find("link"))
{
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for the test case.
I can nowreproduce it. It lookslike this was already recentlyreported as DPD200180570 in our internal
bugs database. It was fixed internally on 4/10 but too late to make the 12.1 update that's already in progress.
The fixshould make the next 12.1 update (in June).
Sorry for the inconvenience. It looks like you already have a workaround so I won't bother to suggest one...
Anyway, thanks again...
Judy

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