https://bugzilla.kernel.org/show_bug.cgi?id=215851 Bug ID: 215851 Summary: gcc 12.0.1 LATEST: -Wdangling-pointer= triggers Product: File System Version: 2.5 Kernel Version: 5.17.3 Hardware: All OS: Linux Tree: Mainline Status: NEW Severity: normal Priority: P1 Component: XFS Assignee: filesystem_xfs@xxxxxxxxxxxxxxxxxxxxxx Reporter: Erich.Loew@xxxxxxxxxxx Regression: No Date: 20220415 Kernel: 5.17.3 Compiler gcc.12.0.1 File: linux-5.17.3/fs/xfs/libxfs/xfs_attr_remote.c Line: 141 Issue: Linux kernel compiling enables all warnings, this has consequnces: -Wdangling-pointer= triggers because assignment of an address pointing to something inside of the local stack of a function/method is returned to the caller. Doing such things is tricky but legal, however gcc 12.0.1 complains deeply on this. Mitigation: disabling with pragmas temporarily inlined the compiler triggered advises. Interesting: clang-15.0.0 does not complain. Remark: this occurence is reprsentative; the compiler warns at many places To go pass through the compilation I added "-Wno-stringop-overread -Wno-dangling-pointer -Wno-address -Wno-array-bounds -Wno-stringop-truncatio" to the Makefile root file of the kernel tree. This is not the cleanest approach but it helps for time being. -- You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.