Skip to content

Commit f16ecb2

Browse files
authored
Update warning.md
The warning is not in effect at the open curly but rather at the start of the function declaration.
1 parent e9f26c2 commit f16ecb2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/preprocessor/warning.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ This directive is functionally equivalent to the following code:
5151

5252
The compiler adds 4000 to any warning number that is between 0 and 999.
5353

54-
For warning numbers in the range 4700-4999, which are the ones associated with code generation, the state of the warning in effect when the compiler encounters the open curly brace of a function will be in effect for the rest of the function. Use of the **warning** pragma in the function to change the state of a warning number larger than 4699 only takes effect after the end of the function. The following example shows the correct placement of **warning** pragmas to disable a code-generation warning message, and then to restore it.
54+
For warning numbers in the range 4700-4999, which are the ones associated with code generation, the state of the warning in effect when the compiler encounters the function definition will be in effect for the rest of the function. Use of the **warning** pragma in the function to change the state of a warning number larger than 4699 only takes effect after the end of the function. The following example shows the correct placement of **warning** pragmas to disable a code-generation warning message, and then to restore it.
5555

5656
```cpp
5757
// pragma_warning.cpp

0 commit comments

Comments
 (0)