internal compiler error at msc1.cpp line 2763 
Author Message
 internal compiler error at msc1.cpp line 2763

This minimal managed C++ code produces an internal compiler error unless the
two __property keywords are commented out, or the StructLayout & FieldOffset
attrs are removed.

Any known workarounds would be appreciated.

Thanks,
Eric Schoen

#using <mscorlib.dll>

using namespace System::Runtime::InteropServices;

[StructLayout(LayoutKind::Explicit)]
__value public class Vector2 {
public:
  // Accesses indexed component of vector
   __property float get_elt(int i) { return(vec[i]); }
  __property  void set_elt(int i, float v) { vec[i]=v; }
protected:
  [FieldOffset(0)]
  float vec __nogc[2];

Quote:
};



Sat, 29 May 2004 13:54:45 GMT  
 internal compiler error at msc1.cpp line 2763

Quote:
>This minimal managed C++ code produces an internal compiler error unless the
>two __property keywords are commented out, or the StructLayout & FieldOffset
>attrs are removed.

Eric,

If you've not already done so, please report this problem to MS at
https://beta.visualstudio.net.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.



Sat, 29 May 2004 18:13:58 GMT  
 internal compiler error at msc1.cpp line 2763
Hi Eric,

Yes, you have found a bug.

The workaround for value types is to add explicit padding using private data
members (the layout for value types is always Sequential by default). I
don't know a good workaround for reference types. I'll investigate more.

Ronald Laeremans
Visual C++ compiler team


Quote:
> This minimal managed C++ code produces an internal compiler error unless
the
> two __property keywords are commented out, or the StructLayout &
FieldOffset
> attrs are removed.

> Any known workarounds would be appreciated.

> Thanks,
> Eric Schoen

> #using <mscorlib.dll>

> using namespace System::Runtime::InteropServices;

> [StructLayout(LayoutKind::Explicit)]
> __value public class Vector2 {
> public:
>   // Accesses indexed component of vector
>    __property float get_elt(int i) { return(vec[i]); }
>   __property  void set_elt(int i, float v) { vec[i]=v; }
> protected:
>   [FieldOffset(0)]
>   float vec __nogc[2];
> };



Sat, 29 May 2004 23:34:07 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. C1001: INTERNAL COMPILER ERROR (compiler files 'msc1.cpp', line 2844)

2. C1001: INTERNAL COMPILER ERROR (compiler file 'msc1.cpp', line 1794)

3. INTERNAL COMPILER ERROR - compiler file 'msc1.cpp', line 1794)

4. INTERNAL COMPILER ERROR file 'msc1.cpp', line 2701

5. INTERNAL COMPILER ERROR - msc1.cpp', line 2844

6. Compiler error in compiler file msc1.cpp line 1786

7. Intermittent C1001 Internal Compiler Error (msc1.cpp 2844)

8. msc1.cpp, line 2844 error

9. msc1.cpp line 1188 error when built on Win95 but not on NT

10. fatal error C1001 (msc1.cpp line 1794)

11. msc1.cpp line 1188 error when built on Win95 but not on NT

12. C1001 (comiler file 'msc1.cpp',line 1188)

 

 
Powered by phpBB® Forum Software