I’ve written before about the compiler bug in managed C++ 7.1. From the information I had available, it looked like the compiler warning was merely a false-positive. Unfortunately, it looks like the problem goes deeper than that.

Consider this test application:

```
// Managed C++ legacy syntax for .Net 1.0
#include "stdafx.h"
#using <mscorlib.dll>
using namespace System;
using namespace System::Collections;
// commented the FlagsAttribute to simplify printout
//[FlagsAttribute]
__value enum MyEnum : Int64 {
None = 0,
Flag0 = 1i64 << 0,
Flag1 = 1i64 << 1,
Flag2 = 1i64 << 2,
Flag3 = 1i64 << 3,
Flag4 = 1i64 << 4,
Flag5 = 1i64 << 5,
Flag6 = 1i64 << 6,
Flag7 = 1i64 << 7,
Flag8 = 1i64 << 8,
Flag9 = 1i64 << 9,
Flag10 = 1i64 << 10,
Flag11 = 1i64 << 11,
Flag12 = 1i64 << 12,
Flag13 = 1i64 << 13,
Flag14 = 1i64 << 14,
Flag15 = 1i64 << 15,
Flag16 = 1i64 << 16,
Flag17 = 1i64 << 17,
Flag18 = 1i64 << 18,
Flag19 = 1i64 << 19,
Flag20 = 1i64 << 20,
Flag21 = 1i64 << 21,
Flag22 = 1i64 << 22,
Flag23 = 1i64 << 23,
Flag24 = 1i64 << 24,
Flag25 = 1i64 << 25,
Flag26 = 1i64 << 26,
Flag27 = 1i64 << 27,
Flag28 = 1i64 << 28,
Flag29 = 1i64 << 29,
Flag30 = 1i64 << 30,
Flag31 = 1i64 << 31,
Flag32 = 1i64 << 32,
Flag33 = 1i64 << 33,
Flag34 = 1i64 << 34,
Flag35 = 1i64 << 35,
Flag36 = 1i64 << 36,
Flag37 = 1i64 << 37,
Flag38 = 1i64 << 38,
Flag39 = 1i64 << 39,
Flag40 = 1i64 << 40,
Flag41 = 1i64 << 41,
Flag42 = 1i64 << 42,
Flag43 = 1i64 << 43,
Flag44 = 1i64 << 44,
Flag45 = 1i64 << 45,
Flag46 = 1i64 << 46,
Flag47 = 1i64 << 47,
Flag48 = 1i64 << 48,
Flag49 = 1i64 << 49,
Flag50 = 1i64 << 50,
Flag51 = 1i64 << 51,
Flag52 = 1i64 << 52,
Flag53 = 1i64 << 53,
Flag54 = 1i64 << 54,
Flag55 = 1i64 << 55,
Flag56 = 1i64 << 56,
Flag57 = 1i64 << 57,
Flag58 = 1i64 << 58,
Flag59 = 1i64 << 59,
Flag60 = 1i64 << 60,
Flag61 = 1i64 << 61,
Flag62 = 1i64 << 62,
Flag63 = 1i64 << 63,
All = Int64::MaxValue
};
int _tmain()
{
Console::WriteLine(S"Testing enum range");
Array* values = Enum::GetValues(__typeof(MyEnum));
for(Int32 i = 0; ...
```