Increase compiler stack size of MSVC

282 Views Asked by At

I am testing a code that is using a large number of variables and some __forceinline functions. As a result, I am getting the following compilation error:

Fatal error C1063: compiler limit: compiler stack overflow

This makes perfect sense as the compiler stack gets filled up for keeping track of the information of the variables.

MSDN suggests: Simplify the program by splitting it into smaller source files, and recompile, which I agree is the solution to my problem. However, I want to test my program as it is by increasing the compiler stack size if possible.

Note that I am not trying to increase the program stack size which could be done using /STACK linker option.

I am using Visual Studio 2019 (v.16.3.9, MSVC++ 14.23).

Thanks.

0

There are 0 best solutions below