नोट
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप साइन इन करने या निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
'identifier': function with _alloca() inlined into a loop
Remarks
The 'identifier' function forces inline expansion of the _alloca function within a loop, which might cause a stack overflow when the loop is executed.
To correct this error
Ensure that the 'identifier' function isn't modified with the
__forceinlinespecifier.Ensure that the 'identifier' function doesn't contain a
_allocafunction that is contained in a loop.Place the
_allocafunction in a try-except statement that will catch a stack overflow.
Example
The following code example calls MyFunction in a loop, and MyFunction calls the _alloca function. The __forceinline modifier causes the inline expansion of the _alloca function.
// c4750.cpp
// compile with: /O2 /W1 /c
#include <intrin.h>
char * volatile newstr;
__forceinline void myFunction(void) // C4750 warning
{
// The _alloca function does not require a __try/__except
// block because the example uses compiler option /c.
newstr = (char * volatile) _alloca(1000);
}
int main(void)
{
for (int i=0; i<50000; i++)
myFunction();
return 0;
}