Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
Qt Creator 4.4.0
-
None
-
* gcc version 7.2.0 (GCC)
* clang version 4.0.1 (tags/RELEASE_401/final)
* GNU C Library (GNU libc) stable release version 2.26
* Qt Creator 4.4.0 Based on Qt 5.9.1 (GCC 7.2.0, 64 bit)
* ClangBackend 1.0.0
* Clang Code Model set to global setting 'Pedantic Warnings [built-in]'
* ArchLinux 4.12.12-1-ARCH x86_64* gcc version 7.2.0 (GCC) * clang version 4.0.1 (tags/RELEASE_401/final) * GNU C Library (GNU libc) stable release version 2.26 * Qt Creator 4.4.0 Based on Qt 5.9.1 (GCC 7.2.0, 64 bit) * ClangBackend 1.0.0 * Clang Code Model set to global setting 'Pedantic Warnings [built-in]' * ArchLinux 4.12.12-1-ARCH x86_64
Description
After ArchLinux upgraded gcc to version 7.2 and/or glibc to 2.26, clang backend displays a warning for Plain C/C++ cross-built projects, about being unable to parse headers.
It says : 'Warning: The code model could not parse included file, which may lead to slow or incorrect code completion and highlighting, for example'.
Project are built for 32bits on 64bit linux. After selecting native, 64b kit, there is no error nor any warning.
- With a C++ project, instantly after project creation, from the included <iostream> header from the new project template, the warning displays:
new:120:7: error: 'operator new' takes type size_t ('unsigned int') as first parameter main.cpp:1:1: note: in file included from /home/kk/untitleddd/untitled2/main.cpp:1: main.cpp:1:10: note: in file included from /home/kk/untitleddd/untitled2/main.cpp:1: iostream:39:10: note: in file included from /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../include/c++/7.2.0/iostream:39: ostream:38:10: note: in file included from /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../include/c++/7.2.0/ostream:38: ios:39:10: note: in file included from /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../include/c++/7.2.0/ios:39: exception:142:10: note: in file included from /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../include/c++/7.2.0/exception:142: exception_ptr.h:40:10: note: in file included from /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../include/c++/7.2.0/bits/exception_ptr.h:40:
- With a C++ project, after including <cmath> or <cstdlib>, the warning displays:
cpp_type_traits.h:261:9: error: __int128 is not supported on this target main.cpp:1:1: note: in file included from /home/kk/untitleddd/untitled2/main.cpp:1: main.cpp:2:10: note: in file included from /home/kk/untitleddd/untitled2/main.cpp:2: cmath:42:10: note: in file included from /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../include/c++/7.2.0/cmath:42:
- With a Plain C project, after including <math.h> it displays:
mathcalls-helper-functions.h:21:36: error: unknown type name '_Float128' main.c:1:1: note: in file included from /home/kk/untitleddd/untitled/main.c:1: main.c:2:10: note: in file included from /home/kk/untitleddd/untitled/main.c:2: math.h:30:16: note: in file included from /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../include/c++/7.2.0/math.h:30: math.h:312:12: note: in file included from /usr/include/math.h:312:
Steps to reproduce:
- Install GCC-7.2 and GLIBC-2.26
- Create a kit for 32bit desktop build
- Create new Plain C or C++ project
- Select 32bit kit
- Include aforementioned header files
- See the results
Attached screenshots with the warnings, clangbackend debug output and my kit and compiler settings.
Clang and GCC compiles the projects without any errors!