[LLVMdev] Cant compile for (auto & fe: SeenFileEntries) with gcc48

Armin Steinhoff as at steinhoff-automation.com
Tue Jun 10 04:15:21 PDT 2014


Hi,

I can't recompile the auto declaration within FileManager.cpp using gcc
4.8 :


FileManager.cpp: In member function ‘const clang::FileEntry*
clang::FileManager::getFile(llvm::StringRef, bool, bool)’:
FileManager.cpp:311:10: warning: ‘auto’ changes meaning in C++11; please
remove it [-Wc++0x-compat]
for (auto & fe: SeenFileEntries) {
^
FileManager.cpp:311:17: warning: ISO C++ forbids declaration of ‘fe’
with no type [-fpermissive]
for (auto & fe: SeenFileEntries) {
^
FileManager.cpp:311:21: error: range-based ‘for’ loops are not allowed
in C++98 mode
for (auto & fe: SeenFileEntries) {
^
FileManager.cpp:312:14: error: request for member ‘getValue’ in ‘fe’,
which is of non-class type ‘int’
if (fe.getValue() == StaleFileEntry) {
^
FileManager.cpp:313:12: error: request for member ‘setValue’ in ‘fe’,
which is of non-class type ‘int’
fe.setValue(&UFE);
^
/usr/bin/rm: cannot remove
‘/home/Clang/src/tools/clang/lib/Basic/Debug+Asserts/FileManager.d.tmp’:
No such file or directory
make[4]: ***
[/home/Clang/src/tools/clang/lib/Basic/Debug+Asserts/FileManager.o] Error 1
make[4]: Leaving directory `/home/Clang/src/tools/clang/lib/Basic'


Is there a patch available ?

--Armin




More information about the llvm-dev mailing list