-
Notifications
You must be signed in to change notification settings - Fork 658
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
Fix or work around gcc-14 warnings/errors. #19758
Conversation
@@ -248,6 +248,8 @@ iree_select_compiler_opts(IREE_DEFAULT_COPTS | |||
"-Wno-unknown-pragmas" | |||
"-Wno-unused-but-set-variable" | |||
"-Wno-misleading-indentation" | |||
# False positives? Not useful? https://stackoverflow.com/a/78760067 |
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.
Annoying? ✅
@@ -248,6 +248,8 @@ iree_select_compiler_opts(IREE_DEFAULT_COPTS | |||
"-Wno-unknown-pragmas" | |||
"-Wno-unused-but-set-variable" | |||
"-Wno-misleading-indentation" | |||
# False positives? Not useful? https://stackoverflow.com/a/78760067 | |||
$<$<COMPILE_LANGUAGE:CXX>:-Wno-dangling-reference> |
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.
cc1plus: error: unrecognized command line option '-Wno-dangling-reference' [-Werror]
argh, older versions of gcc don't recognize this option
https://github.com/iree-org/iree/actions/runs/12905050255/job/35983453401#step:4:6256
will try to fix-forward with something like GCC_GTE_XYZ
iree/build_tools/cmake/iree_macros.cmake
Line 393 in a430695
"ALL;CLANG;CLANG_GTE_10;CLANG_GTE_12;CLANG_CL;MSVC;GCC;CLANG_OR_GCC;MSVC_OR_CLANG_CL" |
This should fix the error reported at #19758 (comment) on older gcc versions: `cc1plus: error: unrecognized command line option '-Wno-dangling-reference' [-Werror]`
Fixing or working around a few "warnings as errors" on gcc-14 (released May 2024). These are also causing the aarch64 nightly distribution builds to fail. Note that we also have some new warnings as errors coming in clang-20 (not yet released): https://clang.llvm.org/docs/ReleaseNotes.html#improvements-to-clang-s-diagnostics.
dangling-reference
Not sure how we want to handle these. We have a bunch of code in IREE and torch-mlir that uses temporaries in loop headers, which this warning does not like. For now just disabling the warning.
template-id-cdtor
These looked legit and were easy enough to fix.