- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am building the following code (I can only give a snippet here), and I am seeing the error I show after the code snippet. The code builds fine with the MS VS 2005.
I am assuming this code violates something in the C++ standard. I have been trying to reproduce the error by rewriting the line that throws the error without using the typedefs. I cannot seem to reproduce this. I expect I do not understand the typedefs well enough.
Can anyone help?
Thank you,
Todd
Here is the code:
///////////////////////////////////
// From included code:
#if 0
typedef long (EventHandler::*EventHandlerFunc)(void *);
struct COMMON_EXPORT_CLASS EventID
{
EventID(unsigned int i_code, EventHandlerFunc i_func);
unsigned int d_code;
EventHandlerFunc d_func;
};
#endif
typedef long (VelocityManager::*Localhandler)(void*);
EventProc_NS::EventID g_events_VelocityManager[] =
{
// What does this expand to because of the typedefs above?
// I cannot recreate it without the typedefs.
// **** The following line throws the error:
EventProc_NS::EventID(ParentChanged,
(EventProc_NS::EventHandlerFunc)(Localhandler)&VelocityManager::onToothDeleted),
EventProc_NS::EventID(0, 0) //sentinel
};
///////////////////////////////////
Here is the error the Intel compiler throws:
1>Compiling with Intel C++ Compiler 11.1.068 [IA-32]... (Intel C++ Environment)
1>Intel C++ Compiler for applications running on IA-32, Version 11.1 Build 20090930 Package ID: composer_update2_revised.068
1>Copyright (C) 1985-2009 Intel Corporation. All rights reserved.
...
1>.\VelocityManager_mini_version.cpp(103): internal error: type_pointed_to: not a pointer type
1> EventProc_NS::EventID g_events_VelocityManager[] =
1> ^
1>
1>compilation aborted for .\VelocityManager_mini_version.cpp (code 4)
-- end --
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is small and complete example that brings the same "internal error: type_pointed_to: not a pointer type":
It would be great if Intel compiler said something more explicable than"internal error: type_pointed_to: not a pointer type"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've submitted a bug report to the compiler team and hopefully will geta work-around. If so, I'll post it here.
Thanks again!
Jennifer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, I got some explaination from our compiler engineer.
the double cast inside "foo()" is not so good. if changing to
(aFunc)&B::b; // both icl/cl will give compile-time error
Although the above code compiles ok with cl, but it's questionable if the binary will run correctly all the time. But icl should not give "Internal Error" and we will fix that. Once that is fixed, I'll post another update here.
Thanks again!
Jennifer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Although the above code compiles ok with cl, but it's questionable if the binary will run correctly all the time.
I would like just to clarify, that I prepared this code snippet on the base of a real program that works well being compiled by cl.
Also you can verify that the code is compiled without errors with gcc.
Thanks, Fedor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just an update. This issue is fixed in the 13.x compiler. You can find the 13.1 from our Registration center or the eval center.
Jennifer

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