Visual C ++ Functions #pragma warning
, which, among other things, allows you to change the warning level for a specific warning. Say warning X has level 4 by default and then
#pragma warning( 3, X )
he will have level 3 from this point.
I understand why I temporarily turned off the warning, turned the warning into an error message, or turned on waring, which is disabled by default. But why should I change the warning level?
I mean that the warning level of a specific warning works together with the "warning level" option of the /W
compiler, so I cannot imagine a setting in which I would like to change the level of an individual warning, since the warning emitted or will not depend on the project settings .
What are real examples of when I really need to change the alert level for a specific alert in C ++?
source share