[Bug c++/89554] Incorrect location of warning

david.bolvansky at gmail dot com gcc-bugzilla@gcc.gnu.org
Sat Mar 2 20:31:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89554

--- Comment #1 from Dávid Bolvanský <david.bolvansky at gmail dot com> ---
Another weird report:
Building CXX object lib/Lex/CMakeFiles/clangLex.dir/PPMacroExpansion.cpp.o
In file included from
/home/xbolva00/LLVM/llvm-project/clang/include/clang/Basic/SourceManager.h:37:0,
                 from
/home/xbolva00/LLVM/llvm-project/clang/include/clang/Lex/DirectoryLookup.h:17,
                 from
/home/xbolva00/LLVM/llvm-project/clang/lib/Lex/PPMacroExpansion.cpp:23:
/home/xbolva00/LLVM/llvm-project/clang/include/clang/Basic/Diagnostic.h: In
function ‘void EvaluateFeatureLikeBuiltinMacro(llvm::raw_svector_ostream&,
clang::Token&, clang::IdentifierInfo*, clang::Preprocessor&,
llvm::function_ref<int(clang::Token&, bool&)>)’:
/home/xbolva00/LLVM/llvm-project/clang/include/clang/Basic/Diagnostic.h:1230:18:
warning: ‘*((void*)& ResultTok +16)’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
   DB.AddTaggedVal(static_cast<unsigned>(I), DiagnosticsEngine::ak_tokenkind);


*((void*)& ResultTok +16) seems weird for me.


More information about the Gcc-bugs mailing list