Re: [MC++] Internal Compiler Error with /Ox
- From: ricecake@xxxxxxxxxxxxxxxx (Marcus Kwok)
- Date: Tue, 16 May 2006 06:58:02 -0700
Marcus Kwok <ricecake@xxxxxxxxxxxxxxxx> wrote:
I saw in
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmex/html/vclrfrestrictionsofmanagedtypes.asp
they mention that value types cannot contain pointers to other managed
types. In my __value struct, I had an array of other __value objects,
so I changed it to an unmanaged array. Now, when I compile using /Ox
for full optimization, I get an Internal Compiler Error.
It turns out that any of the optimization switches I tried resulted in
the ICE.
Can anybody propose a workaround? Upgrading to VS 2005 is not an option
at the time.
bool is_blank(const Contours& contours)
{
Contours::ContourInfo empty = {0, 0, 0, 0};
bool blank = true;
for (int i = 0; i < contours.num_contours; ++i) {
if (!__box(contours.contours[i])->Equals(__box(empty))) {
blank = false;
}
}
return blank;
}
I changed this to
bool is_blank(const Contours& contours)
{
bool blank = true;
for (int i = 0; i < contours.num_contours; ++i) {
if ((contours.contours[i].lower_bound != 0.0) ||
(contours.contours[i].r != 0) ||
(contours.contours[i].g != 0) ||
(contours.contours[i].b != 0)) {
blank = false;
}
}
return blank;
}
and I no longer get the ICE.
--
Marcus Kwok
Replace 'invalid' with 'net' to reply
.
- References:
- [MC++] Internal Compiler Error with /Ox
- From: Marcus Kwok
- [MC++] Internal Compiler Error with /Ox
- Prev by Date: Re: [MC++] NullReferenceException with value structs?
- Next by Date: Thread count of a Process
- Previous by thread: [MC++] Internal Compiler Error with /Ox
- Next by thread: Solved
- Index(es):
Relevant Pages
|