Details
-
Suggestion
-
Resolution: Done
-
P3: Somewhat important
-
Qt Creator 2.0.0
-
None
-
c56b999ffff249d4cb7dc7e8026a3297b63ff56d
Description
I'm using Creator 2.0 with a C99 program and have the following demo structure:
typedef struct { char name[20]; int ID; int age; FILE *record; } Employee; Employee emp = {.ID=0, .record=NULL};
This is valid C99 code but Creator underlines the initializer line in red with the error 'expected token '} ' got '.'
The code compiles fine without errors.
I'm using GCC 4.2 on OS 10.6.3 and have added the QMAKE_CFLAGS += -std=c99 to the .pro file.
While I appreciate that C++ has priority, C remains a very popular language and Creator is an excellent IDE for C development. This is only the problem I've encountered.
Attachments
Issue Links
- replaces
-
QTCREATORBUG-3622 syntax parcing preinitialized C-struct
- Closed
For Gerrit Dashboard: QTCREATORBUG-1902 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
84654,7 | C: Parser: Support parsing of c99 designated initializers | master | qt-creator/qt-creator | Status: MERGED | +2 | 0 |
87671,2 | C: Parser: Support parsing of c99 designated initializers | master | qt-creator/qt-creator | Status: MERGED | +2 | 0 |