Internal Compiler Error using temporary object containing gcroot

  • Thread starter Thread starter Vladimir Kouznetsov
  • Start date Start date
V

Vladimir Kouznetsov

#using <mscorlib.dll>
#include <vcclr.h>
public __gc class A {};
struct B {
void f(A* e);
gcroot<A*> e;
};
int main() {
B().f(new A()); // note that B b; b.f(new A)); works fine
return 0;
}
 
Oh, well.
Either everybody knows or nobody cares...

FWIW, the ICE happens with the alpha release Whidbey compiler too -
I'll try to report it to MS.

Dave
 
#using said:
#include <vcclr.h>
public __gc class A {};
struct B {
void f(A* e);
gcroot<A*> e;
};
int main() {
B().f(new A()); // note that B b; b.f(new A)); works fine
return 0;
}

While it's not correct that the compiler gives an ICE, is the code
example valid?

Dave
 
Why would you think it's not?

thanks,
v

David Lowndes said:
While it's not correct that the compiler gives an ICE, is the code
example valid?

Dave
 
Why would you think it's not?

Because I don't use managed C++ myself and I'm really not sure what's
right, wrong, or indifferent with it!

Dave
 
Thank you for your feedback. Sadly I expected someone from MS reacted to
that. Next time I most probably won't report.
TTBOMK this code is legal managed C++.

thanks,
v
 
Thank you for your feedback. Sadly I expected someone from MS reacted to
that. Next time I most probably won't report.
TTBOMK this code is legal managed C++.

I'm sorry that you seem disappointed that I replied. I replied because
no-one else had, and I was only being honest in admitting my lack of
knowledge in managed C++ usage.

FWIW, I had submitted your code as a bug report to MS.

Dave
 
On no David, I'm grateful that you answered. I was disappointed that I did
not receive any "official" reaction. Now, knowing that it was properly
reported, I'm completely satisfied.
Thanks again!

v
 
Thank you for the clarification Ronald,

I was disappointed basically because nobody cared to answer to my first post
for 10 days and after David answered I was not sure if anything changed. Was
my subject line not catchy enough?

thanks,
v
 
Back
Top