gcc: Fix c++: tweak for Wrange-loop-construct
PATCH 1/1 gcc: Fix c++: tweak for Wrange-loop-construct
From: Sunil Dora <[email protected]>
This commit updates the warning to use a check for "trivially constructible" instead of "trivially copyable." The original check was incorrect, as "trivially copyable" only applies to types that can be copied trivially, whereas "trivially constructible" is the correct check for types that can be trivially default-constructed.
This change ensures the warning is more accurate and aligns with the proper type traits.
LLVM accepted a similar fix:
https://github.com/llvm/llvm-project/issues/47355
PR c++/116731 [https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116731]
Signed-off-by Marek Polacek <[email protected]>
Signed-off-by Sunil Dora <[email protected]>
--- meta/recipes-devtools/gcc/gcc-14.2.inc | 1 + ...ix-c-tweak-for-Wrange-loop-construct.patch | 114 ++++++++++++++++++ 2 files changed, 115 insertions(+) create mode 100644 meta/recipes-devtools/gcc/gcc/0026-gcc-Fix-c-tweak-for-Wrange-loop-construct.patch
meta/recipes-devtools/gcc/gcc-14.2.inc +1 -0
@@ -68,6 +68,7 @@ SRC_URI = "${BASEURI} \ file://0023-Fix-install-path-of-linux64.h.patch \ file://0024-Avoid-hardcoded-build-paths-into-ppc-libgcc.patch \ file://0025-gcc-testsuite-tweaks-for-mips-OE.patch \ + file://0026-gcc-Fix-c-tweak-for-Wrange-loop-construct.patch \ file://gcc.git-ab884fffe3fc82a710bea66ad651720d71c938b8.patch \ "
meta/recipes-devtools/gcc/gcc/0026-gcc-Fix-c-tweak-for-Wrange-loop-construct.patch new file +114 -0
114 lines not on this page · raw message
Signature · 1 line
2.43.0