Compiler Error C3191

'syntax' : incompatible with /clr:oldSyntax

The syntax for Managed Extensions for C++ was requested (/clr:oldSyntax). However, the compiler found newer syntax in a source code file.

The following sample generates C3191:

// C3191.cpp
// compile with: /clr:oldSyntax
#using <mscorlib.dll>
using namespace System;
int main() {
   Object ^ o;   // C3191
   Object * o2;   // OK
}