In the following code snippet (C, for ARM embedded chips)
typedef struct __attribute__((__packed__)) MyStruct_S
{
int MyFirstField;
int MySecondField;
} MyStruct_Type;
VS Code complains on the MyStruct_S identifier, following the attribute. The complaint says "expected a ';'C/C++(65)".
And yet this code compiles and runs just fine even with -Wall and -Wextra compiler flags set.
What is VS Code doing wrong? Can we fix the IntelliSence to see that this is correct syntax?
The extensions I have for this workspace are the following:
- Arm Assembly
- C/C++
- Doxygen Documentation Generator
- GNU Linker Map files
- Makefile Tools
- WSL
cheers!