-
Notifications
You must be signed in to change notification settings - Fork 967
Rectify example in C4178 #4975
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rectify example in C4178 #4975
Conversation
@Rageking8 : Thanks for your contribution! The author(s) have been notified to review your proposed change. |
Learn Build status updates of commit 22ecb5c: ✅ Validation status: passed
For more details, please refer to the build report. For any questions, please:
|
PRMerger Results
|
#label:"aq-pr-triaged" |
Looking into why /permissive is required. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. You are correct - the compiler requires /permissive to catch this situation.
#sign-off |
Rectified some errors in the previous example, namely:
i
, which is UBunsigned int
but the type ofi
isint
The warning is also not emitted with just
/W1
and the default settings of a fresh latest VS2022 C++ project. For some reason, the/permissive
flag must be set for the warning to be shown. WIth the default of/permissive-
, the warning is not emitted even with/Wall
and/or/w14178
. Not sure if the root cause is some other more granular flag being implicitly set by the permissive flag.