[Qt-creator] Syntax highlight doesn't understand C99 initializers?
Danny Price
deepblue842 at googlemail.com
Fri Jul 16 00:43:02 CEST 2010
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 '.'
Is this a bug? The code compiles fine without errors.
I'm using GCC 4.2 on OS 10.6.2 and have added the QMAKE_CFLAGS += -std=c99 to the .pro file.
More information about the Qt-creator-old
mailing list