Delen via


Compilerfout C2494

'trefwoord' kan niet worden aangeroepen vanuit een filterexpressie of __finally/finally-blok

Opmerkingen

U kunt geen trefwoord in een __finally of finally blok gebruiken.

Voorbeelden

In het volgende voorbeeld wordt C2494 gegenereerd:

// C2494.cpp
#include <malloc.h>

int main() {
   __try {}
   __except ( _alloca(100), 1 ) {}   // C2494
   __try {}
   __finally {
      _alloca(100);   // C2494
   }
}

C2494 kan ook optreden bij het gebruik van /clr.

// C2494b.cpp
// compile with: /clr
#include <malloc.h>

int main() {
   char * buf;
   try {}
   catch (char * buf2) {}
   finally {
      _alloca(100);   // C2494
   }
}