Details
-
Bug
-
Resolution: Incomplete
-
Not Evaluated
-
None
-
Qt Creator 4.3.0-beta1
-
None
-
OS X 10.12.2 Sierra, default clang compiler
Description
This is a followup on QTCREATORBUG-15303
I am on OS X 10.12.2 Sierra. I am not sure if any of the following applies to other platforms.
In 4.3.0-beta-1, .c files are now correctly recognized as C code (not C++ anymore). However, this works only if the C compiler is set to GCC (as in the screenshot). If I set it to Clang, then .c files are still parsed as C++.
Types from <stdint.h> do not work in C mode. E.g., uint8_t is not recognized as a valid type (screenshot).
In C++ mode, there is no problem with <stdint.h> (or with <cstdint>).
<stdint.h> on my system is very similar to this: http://clang.llvm.org/doxygen/stdint_8h_source.html There seem to be separate and different definitions for C and C++. I am not sure where the C ones are as they use #include_next.
A generic project that demonstrates the problem is attached.
Attachments
Issue Links
- relates to
-
QTCREATORBUG-15303 Clang: .c files are treated as C++
- Closed