Compiler Error C3204

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Compiler Error C3204.

_alloca' cannot be called from within a catch block

This error occurs when you use a call to _alloca from within a catch block.

The following sample generates C3204:

// C3204.cpp  
// compile with: /EHsc  
#include <malloc.h>  
  
void ShowError(void)  
{  
   try  
   {  
   }  
   catch(...)  
   {  
      _alloca(1);   // C3204  
   }  
}  

Show: