Compiler Error C3148

illegal __nogc pointer to managed type 'type'

A pointer to a managed type cannot be declared with the __nogc keyword.

C3148 is only reachable using /clr:oldSyntax.

The following sample generates C3148:

// C3148.cpp
// compile with: /clr:oldSyntax
#using<mscorlib.dll>
__gc class G {};

int main() {
   G __nogc *pg;   // C3148
   G *pg2;   // OK
   G __gc *pg3;
}