There are some pretty dumb compilers, such as TI's DSP compiler toolchain, that lack good VSCode support and come with bizarre keywords.
When we edit these projects in VSCode, semantic parsing gets badly disrupted. I worked around this once before, but today I forgot again.
A good workaround is to define these keywords as empty defines in the C/C++ extension's define setting. The example below shows this for the interrupt keyword. You need a trailing equals sign to make the definition empty.
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${default}",
"${workspaceFolder}/**"
],
"defines": [
"__GNUC__",
"_DEBUG",
"UNICODE",
"_UNICODE",
"interrupt="
],
"compilerPath": "C:/111_APPS/MSYS2/mingw64/bin/gcc.exe",
"cStandard": "c17",
"cppStandard": "gnu++17",
"intelliSenseMode": "windows-gcc-arm",
"configurationProvider": "ms-vscode.cmake-tools"
}
],
"version": 4
}
Make VSCode's C/C++ Semantic Parsing Ignore Keywords It Doesn't Recognize
interruptto nothing (with an equals sign for an empty definition).