Details
-
Bug
-
Resolution: Invalid
-
P3: Somewhat important
-
None
-
Qt Creator 3.6.1
-
Linux/KDE
Description
- Use last stable Qt Creator 3.6.1
- Сreate plain C application, which uses anonymous structure
- Here is code
test.pro
TEMPLATE = app CONFIG += console CONFIG -= app_bundle CONFIG -= qt QMAKE_CFLAGS += -std=gnu11 -fms-extensions SOURCES += \ main.c HEADERS += \ main.h
main.h
#ifndef MAIN_H #define MAIN_H #define TEST_SIZE 512 typedef struct test { struct unnamed_test { int test_field; }; char reserved[(int)(TEST_SIZE - sizeof(struct unnamed_test))]; } test; #endif // MAIN_H
main.c
#include <stdio.h> #include "main.h" int main(int argc, char *argv[]) { test t; t.test_field = 0xfeed4c0d; printf("test_field = %#x\n", t.test_field); return 0; }
4. Find usages feature (Ctrl+Shift+U hotkey) doesn't shows that field test_field of structure unnamed_test is used in main.c file.
5. Autocomplete don't work for structure test.