Fake error with structure
-
Hi,
Qt Creator highlights these constructs as an error in a C project:
But it compiles without errors. When you hover your mouse over this line, a message appears:
unexpected token 'struct'
You can reproduce by creating an empty Non-Qt C project: File > New Project > Non-Qt Project > Plain C Application
main.c
#include <stdio.h> struct myStructure { int a; int b; }; int main() { struct myStructure s = (struct myStructure){1, 2}; return 0; }
Maybe is the bug report already exist? Or should I create a new bug report?
-
@8Observer8 said in Fake error with structure:
Or should I create a new bug report?
What code model do you use? If it is not clang but the internal I don't think it's worth reporting a bug.
-
@Christian-Ehrlicher said in Fake error with structure:
What code model do you use? If it is not clang but the internal
I don't understand what do you mean. I've download Qt Creator 15.0.0 here: https://github.com/qt-creator/qt-creator/releases I have CMake 3.27 and MinGW 14.2: https://github.com/skeeto/w64devkit/releases. I just want to use pure C language with CMake. I've created a project like this: