marxin / cvise

Super-parallel Python port of the C-Reduce
Other
219 stars 25 forks source link

Build failure with recent trunk: possibly dangling reference to a temporary #102

Closed tkoenig1 closed 1 year ago

tkoenig1 commented 1 year ago
tkoenig@gcc188:~/cvise-build> c++ --version
c++ (GCC) 13.0.0 20230105 (experimental) [master r13-4915-g9b111debbfb]
Copyright (C) 2023 Free Software Foundation, Inc.
tkoenig@gcc188:~> cc --version
cc (GCC) 13.0.0 20230105 (experimental) [master r13-4915-g9b111debbfb]
Copyright (C) 2023 Free Software Foundation, Inc.

(so I finally got that right).

Error message is

[ 53%] Building CXX object clang_delta/CMakeFiles/clang_delta.dir/RemoveUnresolvedBase.cpp.o
/home/tkoenig/cvise/clang_delta/RemoveNestedFunction.cpp: In member function »void RemoveNestedFunction::getVarStrForTemplateSpecialization(std::string&, const clang::TemplateSpecializationType*)«:
/home/tkoenig/cvise/clang_delta/RemoveNestedFunction.cpp:200:29: Fehler: possibly dangling reference to a temporary [-Werror=dangling-reference]
  200 |     const TemplateArgument &Arg = TST->template_arguments()[I];
      |                             ^~~
/home/tkoenig/cvise/clang_delta/RemoveNestedFunction.cpp:200:62: Anmerkung: the temporary was destroyed at the end of the full expression »TST->clang::TemplateSpecializationType::template_arguments().llvm::ArrayRef<clang::TemplateArgument>::operator[](((size_t)I))«
  200 |     const TemplateArgument &Arg = TST->template_arguments()[I];

Here is the cache:

CMakeCache.txt

marxin commented 1 year ago

This is a known issue: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107532 Please use ideally the latest release 12.2.0.