-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Disable the -Wstringop-overflow warning from GCC 7 #2442
Conversation
Thanks for the PR but since it's a false positive please report to gcc maintainers. |
Gcc meta-bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88443 I think, this warnings are similar to existing bugs: |
@@ -26,6 +26,10 @@ function(add_fmt_executable name) | |||
if (MINGW) | |||
target_link_libraries(${name} -static-libgcc -static-libstdc++) | |||
endif () | |||
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND |
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.
Could you add a link to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88443 or whatever the most relevant gcc bug is?
Also is it fixed in gcc 11?
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.
Done.
There are no warnings in gcc version 11.1.1 20210721 [revision 076930b9690ac3564638636f6b13bbb6bc608aea] (SUSE Linux)
.
42fc7a4
to
781bbf7
Compare
Thank you! |
Disable the -Wstringop-overflow warning from GCC 7 (fmtlib#2442)
…due to too many false positives with libfmt. See fmtlib/fmt#2442 (comment) and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88443
- FMT will trigger a gcc bug on stringop-overflow with gcc versions 11 and earlier - FMT issue fmtlib/fmt#2442 - FMT issue fmtlib/fmt#2708 - GCC bug tracker https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101854 - Confirming it still appears on gcc-11 https://godbolt.org/z/d15q4Exvz
- FMT will trigger a gcc bug on stringop-overflow with gcc versions 11 and earlier - FMT issue fmtlib/fmt#2442 - FMT issue fmtlib/fmt#2708 - GCC bug tracker https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101854 - Confirming it still appears on gcc-11 https://godbolt.org/z/d15q4Exvz
- FMT will trigger a gcc bug on stringop-overflow with gcc versions 11 and earlier - FMT issue fmtlib/fmt#2442 - FMT issue fmtlib/fmt#2708 - GCC bug tracker https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101854 - Confirming it still appears on gcc-11 https://godbolt.org/z/d15q4Exvz
- FMT will trigger a gcc bug on stringop-overflow with gcc versions 11 and earlier - FMT issue fmtlib/fmt#2442 - FMT issue fmtlib/fmt#2708 - GCC bug tracker https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101854 - Confirming it still appears on gcc-11 https://godbolt.org/z/d15q4Exvz
- FMT will trigger a gcc bug on stringop-overflow with gcc versions 11 and earlier - FMT issue fmtlib/fmt#2442 - FMT issue fmtlib/fmt#2708 - GCC bug tracker https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101854 - Confirming it still appears on gcc-11 https://godbolt.org/z/d15q4Exvz
Fix for false positive warnings if LTO is enabled:
Discussion in Boost.JSON issue: boostorg/json#597