-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add -Wno-format-truncation
to root project
#2719
Conversation
CMakeLists.txt
Outdated
@@ -56,6 +56,10 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") | |||
$<$<COMPILE_LANGUAGE:CXX>:-Wno-vla-extension> | |||
$<$<COMPILE_LANGUAGE:CXX>:-Wno-zero-length-array> | |||
) | |||
else() |
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.
Is there something special about autodocs that triggers truncation warnings? I would have expected that truncation would be failing on normal gcc builds as part of CI.
I'm a little leary of conditionally disabling format truncation only if the compiler isn't clang. Maybe consider always disable the format truncation warning if we're not ready to resolve it yet?
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.
The issue is that clang does not support this flag. Thus we cannot disable it on clang.
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.
Gotcha. Maybe just add the flag if the compiler is GCC so we don't break in weird ways on unexpected compilers? That being said I think it's unlikely enough that somebody would build the root cmake project on an odd compiler, so maybe not a significant concern.
Change Description
Rationale
Format truncation are an expected behavior