- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Using DEFINE_GUIDSTRUCT under Visual Studio 2010 and version 12 of the Intel C++ compiler gives the following error"Error : type name is not allowed"
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think I have come up with a reproducer for your problem.
This compiles fine with Microsoft, but broke in our 12.0 release:
void f() {
struct __declspec(uuid("00000000-0000-0000-0000-000000000000")) foo;
}
We will fix this as soon as possible. I have entered it into our bug tracking database as DPD200161827.
The problem is a disambiguation issue between declarations and expressions.
In the meantime, some possible workarounds are:
(1) Change
DEFINE_GUIDSTRUCT(__SOME_GUID__STRING__, SOME_TYPE_FOO_PROPSET);
to:
typedef DEFINE_GUIDSTRUCT(__SOME_GUID__STRING__, SOME_TYPE_FOO_PROPSET) SOME_TYPE_FOO_PROPSET;
(2) Or move this declaration:
DEFINE_GUIDSTRUCT(__SOME_GUID__STRING__, SOME_TYPE_FOO_PROPSET);
to someplace outside of the function (not sure if it's necessary for it to be different in each case label?)
Judy
Link Copied
8 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You'd likely have to look at the pre-processed code and show an actual example here before anyone could comment further.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We may able to help better if you could share the test case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Sure, this is coming from a third party. So I can't really change the code. Also note that it compiled fine under version 11.060.
[cpp]switch (_some_type_) { case _some_type_foo: { DEFINE_GUIDSTRUCT(__SOME_GUID__STRING__, SOME_TYPE_FOO_PROPSET); #define SOME_TYPE_FOO_PROPSET DEFINE_GUIDNAMED(SOME_TYPE_FOO_PROPSET) _GUID_PROPSET = SOME_TYPE_FOO_PROPSET; } break; }[/cpp]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could you please compile the file in question with the "/P" option and send us the resulting .i file along with full compilation options used to compile the file?
Thanks,
--mark
Thanks,
--mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think I have come up with a reproducer for your problem.
This compiles fine with Microsoft, but broke in our 12.0 release:
void f() {
struct __declspec(uuid("00000000-0000-0000-0000-000000000000")) foo;
}
We will fix this as soon as possible. I have entered it into our bug tracking database as DPD200161827.
The problem is a disambiguation issue between declarations and expressions.
In the meantime, some possible workarounds are:
(1) Change
DEFINE_GUIDSTRUCT(__SOME_GUID__STRING__, SOME_TYPE_FOO_PROPSET);
to:
typedef DEFINE_GUIDSTRUCT(__SOME_GUID__STRING__, SOME_TYPE_FOO_PROPSET) SOME_TYPE_FOO_PROPSET;
(2) Or move this declaration:
DEFINE_GUIDSTRUCT(__SOME_GUID__STRING__, SOME_TYPE_FOO_PROPSET);
to someplace outside of the function (not sure if it's necessary for it to be different in each case label?)
Judy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, that works for now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
we've fixed this in our 12.0 development compiler, so you should see a fix in the next 12.0 update.
thanks for bringing this to our attention.
Judy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This problem has been resolved in IntelC++ Composer XE update 1 (package ID w_ccompxe_2011.1.127.exe) available for download at registrationcenter.intel.com.
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