[PATCH] D102453: [CMake][ELF] Add -fno-semantic-interposition for GCC and Clang>=13
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 13 09:59:33 PST 2022
MaskRay added a comment.
In D102453#3240227 <https://reviews.llvm.org/D102453#3240227>, @uabelho wrote:
> In D102453#2812941 <https://reviews.llvm.org/D102453#2812941>, @uabelho wrote:
>
>> I noticed that when I compile this patch with gcc 9.3.0 I suddenly see
>>
>> 1122/2282] Building CXX object lib/Object/CMakeFiles/LLVMObject.dir/Archive.cpp.o
>> In file included from ../lib/Object/Archive.cpp:13:
>> ../include/llvm/Object/Archive.h: In member function 'llvm::object::Archive::child_iterator llvm::object::Archive::child_end() const':
>> ../include/llvm/Object/Archive.h:147:48: warning: '*((void*)&<anonymous> +40)' is used uninitialized in this function [-Wuninitialized]
>> 147 | ChildFallibleIterator(const Child &C) : C(C) {}
>>
>> Do you know if this is anything to worry about?
>> I just noticed the warning when compiling after a pull.
>
> Hi!
> Since this patch been up for discussion again, do you know if the gcc warning above is anything that needs to be taken care of?
> It popped up with this patch and is still there.
If the GCC -Wuninitialized warning is related to -fno-semantic-interposition, it is worth filing a bug on https://gcc.gnu.org/bugzilla/ if you can still reproduce with its latest release
I believe we focus on fixing warnings in Clang builds but not that much for GCC warnings. If a warning is sufficiently annoying (sufficiently many files) perhaps a workaround will be considered in the CMake files.
For occasional GCC warnings I think we don't usually want to take code churn for them.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102453/new/
https://reviews.llvm.org/D102453
More information about the llvm-commits
mailing list