1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-02 01:19:52 +00:00

gcc: Fix c++: tweak for Wrange-loop-construct

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]

(From OE-Core rev: b8260e5aca93a7000001013f8a950fb040141588)

Signed-off-by: Marek Polacek <polacek@redhat.com>
Signed-off-by: Sunil Dora <sunilkumar.dora@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
This commit is contained in:
Sunil Dora
2024-12-11 10:15:12 -08:00
committed by Steve Sakoman
parent a1b9be34db
commit d0a0b07574
2 changed files with 115 additions and 0 deletions
+1
View File
@@ -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 \
"