Share via


check_stack pragma

指示編譯器在指定 時關閉堆疊探查,或在指定 或 -+on 開啟堆疊探查 off

語法

#pragma check_stack( [{ on | off }] )
#pragma check_stack { + | - }

備註

這會 pragma 在看到 之後 pragma 定義的第一個函式生效。 堆疊探查不是巨集,也不是產生內嵌的函式。

如果您沒有提供 的 check_stackpragma 引數,堆疊檢查會還原為命令列上指定的行為。 如需詳細資訊,請參閱編譯器選項。 和 /Gs 選項的 #pragma check_stack 互動摘要如下表所示。

使用 check_stack pragma

語法 使用

/Gs 選項?
動作
#pragma check_stack( )

#pragma check_stack
Yes 關閉後續函式的堆疊檢查
#pragma check_stack( )

#pragma check_stack
No 開啟後續函式的堆疊檢查
#pragma check_stack(on)

#pragma check_stack +
是或否 開啟後續函式的堆疊檢查
#pragma check_stack(off)

#pragma check_stack -
是或否 關閉後續函式的堆疊檢查

另請參閱

Pragma 指示詞和 __pragma_Pragma 關鍵字