microsoft / microsoft/vscode-cpptools

When using `"cStandard": "c17"`, errors for calls to functions with missing prototypes are not reported

Open
#14,768 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

Edit: formatting, remove stray junk mostly from my copy/pastes from #14769.

Environment
  • OS and Version: Debian 5.15.153.1-microsoft-standard-WSL2, WSL 2.2.4.0, Windows 10.0.19045.7725
  • VS Code Version: 1.116.0
  • C/C++ Extension Version: 1.34.4
  • If using SSH remote, specify OS of remote machine:
Bug Summary and Steps to Reproduce

Bug Summary:
When using Clang to build a freestanding --target=wasm32 library inside WSL, IntelliSense incorrectly infers implicit function declarations, because with "cStandard": "c17", they very, very obviously shouldn't exist. (That was removed starting C99, over 25 years ago.)

Steps to reproduce:

  1. Start WSL and make sure you have Clang 19.1.7 installed. (Later versions of Clang use a different method internally for the shuffle intrinsic.) Also, ensure there are no open VSCode windows and that no VSCode server is running in the background in the WSL VM. (You can check this pretty quickly with top/htop.)

  2. Create a directory with the following file structure:

    • .vscode/c_cpp_properties.json: see below
    • .vscode/settings.json:
       {
           "C_Cpp.loggingLevel": "Debug"
       }
      
    • test.c:
       int main() {
           struct missing foo;
           one();
           return 0;
       }
      
  3. Compile the executable and observe the following errors:

    clang -std=c17 -o out test.c
    
    test.c:3:20: error: variable has incomplete type 'struct missing'
        3 |     struct missing foo;
          |                    ^
    test.c:3:12: note: forward declaration of 'struct missing'
        3 |     struct missing foo;
          |            ^
    test.c:4:5: error: call to undeclared function 'one'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
        4 |     one();
          |     ^
    2 errors generated.
    
  4. Open the folder in VSCode with only ms-vscode.cpptools running:

    code $(code --list-extensions | grep -v ms-vscode.cpptools | xargs -I % echo '--disable-extension %') .
    
  5. Open test.c.

    You will observe one error squiggle over foo. If you hover over it, you'll see incomplete type "struct missing" is not allowed C/C++(70).

  6. Hover over one. It will show a prototype of int one().

Expected behavior:

An error squiggle to also appear for one.

Configuration and Logs

I've redacted user-related paths, but that's it. $HOME is obvious, and $PROJECT is the project root.

.vscode/c_cpp_properties.json:

{
    "configurations": [
        {
            "name": "Linux",
            "includePath": [
                "${workspaceFolder}/"
            ],
            "defines": [],
            "compilerPath": "/usr/bin/clang",
            "cStandard": "c17",
            "cppStandard": "c++17",
            "intelliSenseMode": "linux-clang-x64"
        }
    ],
    "version": 4
}

Diagnostics logs, grabbed immediately before following the reproduction steps:

Most of this junk is either from extensions that were manually disabled or unrelated customizations I made for JS development.

-------- Diagnostics - 9/13/2026, 9:54:03 AM
Version: 1.34.4
Current Configuration:
{
    "name": "Linux",
    "includePath": [
        "$PROJECT/"
    ],
    "defines": [],
    "compilerPath": "/usr/bin/clang",
    "cStandard": "c17",
    "cppStandard": "c++17",
    "intelliSenseMode": "linux-clang-x64",
    "compilerPathIsExplicit": true,
    "cStandardIsExplicit": true,
    "cppStandardIsExplicit": true,
    "intelliSenseModeIsExplicit": true,
    "recursiveIncludesPriorityIsExplicit": false,
    "recursiveIncludesOrderIsExplicit": false,
    "compilerPathInCppPropertiesJson": "/usr/bin/clang",
    "mergeConfigurations": false,
    "recursiveIncludes": {},
    "browse": {
        "limitSymbolsToIncludedHeaders": true
    }
}
Modified Settings:
{
    "C_Cpp.loggingLevel": "Debug"
}
Additional Tracked Settings:
{
    "editorTabSize": 4,
    "editorInsertSpaces": true,
    "editorAutoClosingBrackets": "languageDefined",
    "filesEncoding": "utf8",
    "filesAssociations": {
        "*.h": "c",
        "*.svg": "svg",
        "*.{asm,inc,s,nasm,yasm,-----------------------------------------}": "asm-x86-nasm"
    },
    "filesExclude": {
        "**/.git": true,
        "**/.svn": true,
        "**/.hg": true,
        "**/.DS_Store": true,
        "**/Thumbs.db": true
    },
    "filesAutoSaveAfterDelay": false,
    "editorInlayHintsEnabled": true,
    "editorParameterHintsEnabled": true,
    "searchExclude": {
        "**/node_modules": true,
        "**/bower_components": true,
        "**/*.code-search": true
    },
    "workbenchSettingsEditor": "ui"
}
cpptools version (native): 1.34.3.0
Current database path: $HOME/.cache/vscode-cpptools/d004e617ed0d21d84b6351fcd0c58a45/.browse.VC.db
No active translation units.

Language server logs, gathered while following the reproduction steps:

loggingLevel: 6
LSP: (received) cpptools/preinitialize (id: 1)
LSP: (invoked) cpptools/preinitialize (id: 1)
LSP: Sending response (id: 1)
LSP: (received) cpptools/initialize (id: 2)
LSP: (invoked) cpptools/initialize (id: 2)
cpptools version (TypeScript): 1.34.4
cpptools version (native): 1.34.3.0
Autocomplete is enabled.
Error squiggles are enabled if all header dependencies are resolved.
Hover is enabled.
IntelliSense Engine = default.
LSP: Sending response (id: 2)
LSP: (received) cpptools/queryCompilerDefaults (id: 3)
LSP: (invoked) cpptools/queryCompilerDefaults (id: 3)
LSP: (received - deferred) cpptools/didChangeVisibleTextEditors
LSP: (received - deferred) cpptools/didChangeVisibleTextEditors
Querying compiler for default C++ language standard using command line: /usr/bin/clang -x c++ -E -dM /dev/null
Detected language standard version: c++17
Querying compiler for default C language standard using command line: /usr/bin/clang -x c -E -dM /dev/null
Detected language standard version: c17
Querying compiler's default target using command line: "/usr/bin/clang" -dumpmachine
Compiler returned default target value: x86_64-pc-linux-gnu
Compiler info database not connected - skipping load.
Compiler query command line: /usr/bin/clang -std=c17 -m64 -Wp,-v -fno-blocks -E -dM -x c /dev/null
Attempting to get defaults from C compiler in "compilerPath" property: '/usr/bin/clang'
Compiler info database not connected - skipping load.
Compiler query command line: /usr/bin/clang -std=c++17 -m64 -Wp,-v -fno-blocks -E -dM -x c++ /dev/null
Attempting to get defaults from C++ compiler in "compilerPath" property: '/usr/bin/clang'
LSP: Sending response (id: 3)
Processed c_cpp_properties.json in 0.003385721s
LSP: (received) cpptools/queryCompilerDefaults (id: 4)
LSP: (invoked) cpptools/queryCompilerDefaults (id: 4)
LSP: (received) cpptools/didChangeCppProperties
LSP: Sending response (id: 4)
LSP: (invoked) cpptools/didChangeCppProperties
  Folder: $PROJECT will be indexed
  Folder: /usr/include will be indexed
  Folder: /usr/lib/llvm-19/lib/clang/19/include will be indexed
  Folder: /usr/local/include will be indexed
Opening code store: $HOME/.cache/vscode-cpptools/d004e617ed0d21d84b6351fcd0c58a45/.browse.VC.db
Code browsing service initialized
LSP: (queued) cpptools/didChangeVisibleTextEditors
LSP: (queued) cpptools/didChangeVisibleTextEditors
LSP: (invoked) cpptools/didChangeVisibleTextEditors
Unified Store: Files Initialized (completed)
Done parsing remaining files.
Unified Store: Configuration Initialized (completed)
Done parsing remaining files.
LSP: (received) cpptools/getDiagnostics (id: 5)
LSP: (invoked) cpptools/getDiagnostics (id: 5)
LSP: Sending response (id: 5)
LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: (invoked) cpptools/didChangeVisibleTextEditors
LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: (invoked) cpptools/didChangeVisibleTextEditors
LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: (invoked) cpptools/didChangeVisibleTextEditors
LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: (invoked) cpptools/didChangeVisibleTextEditors
LSP: (received) textDocument/didOpen: file://$PROJECT/test.c
LSP: (invoked) textDocument/didOpen: file://$PROJECT/test.c
textDocument/didOpen: file://$PROJECT/test.c
LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: (received) cpptools/getCodeActions: file://$PROJECT/test.c (id: 6)
LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: (received) cpptools/didChangeActiveEditor: file://$PROJECT/test.c
LSP: (received) cpptools/getDocumentSymbols: file://$PROJECT/test.c (id: 7)
LSP: (received) cpptools/didChangeTextEditorSelection
LSP: (invoked) cpptools/getCodeActions: file://$PROJECT/test.c (id: 6)
LSP: (invoked) cpptools/didChangeVisibleTextEditors
Intellisense update pending for: file://$PROJECT/test.c
LSP: (invoked) cpptools/didChangeActiveEditor: file://$PROJECT/test.c
LSP: (invoked) cpptools/getDocumentSymbols: file://$PROJECT/test.c (id: 7)
LSP: (invoked) cpptools/didChangeTextEditorSelection
LSP: Sending response (id: 6)
LSP: Sending response (id: 7)
LSP: (received) cpptools/getCodeActions: file://$PROJECT/test.c (id: 8)
LSP: (invoked) cpptools/getCodeActions: file://$PROJECT/test.c (id: 8)
LSP: Sending response (id: 8)
LSP: (received) cpptools/getCodeActions: file://$PROJECT/test.c (id: 9)
LSP: (invoked) cpptools/getCodeActions: file://$PROJECT/test.c (id: 9)
LSP: Sending response (id: 9)
LSP: (received) cpptools/getFoldingRanges: file://$PROJECT/test.c (id: 10)
LSP: (invoked) cpptools/getFoldingRanges: file://$PROJECT/test.c (id: 10)
LSP: Sending response (id: 10)
LSP: (received) cpptools/getFoldingRanges: file://$PROJECT/test.c (id: 11)
LSP: (invoked) cpptools/getFoldingRanges: file://$PROJECT/test.c (id: 11)
LSP: Sending response (id: 11)
IntelliSense update scheduled and TU acquisition started for: file://$PROJECT/test.c
sending compilation args for $PROJECT/test.c
  canonical: /ClangMode /TC /I"$PROJECT" /Clangisystem"/usr/lib/llvm-19/lib/clang/19/include" /Clangisystem"/usr/local/include" /Clangisystem"/usr/include/x86_64-linux-gnu" /Clangisystem"/usr/include" /D_LP64=1 /D__ATOMIC_ACQUIRE=2 /D__ATOMIC_ACQ_REL=4 /D__ATOMIC_CONSUME=1 /D__ATOMIC_RELAXED=0 /D__ATOMIC_RELEASE=3 /D__ATOMIC_SEQ_CST=5 /D__BIGGEST_ALIGNMENT__=16 /D__BITINT_MAXWIDTH__=8388608 /D__BOOL_WIDTH__=8 /D__BYTE_ORDER__=__ORDER_LITTLE_ENDIAN__ /D"__CHAR16_TYPE__=unsigned short" /D"__CHAR32_TYPE__=unsigned int" /D__CHAR_BIT__=8 /D__CLANG_ATOMIC_BOOL_LOCK_FREE=2 /D__CLANG_ATOMIC_CHAR16_T_LOCK_FREE=2 /D__CLANG_ATOMIC_CHAR32_T_LOCK_FREE=2 /D__CLANG_ATOMIC_CHAR_LOCK_FREE=2 /D__CLANG_ATOMIC_INT_LOCK_FREE=2 /D__CLANG_ATOMIC_LLONG_LOCK_FREE=2 /D__CLANG_ATOMIC_LONG_LOCK_FREE=2 /D__CLANG_ATOMIC_POINTER_LOCK_FREE=2 /D__CLANG_ATOMIC_SHORT_LOCK_FREE=2 /D__CLANG_ATOMIC_WCHAR_T_LOCK_FREE=2 /D__CONSTANT_CFSTRINGS__=1 /D__DBL_DECIMAL_DIG__=17 /D__DBL_DENORM_MIN__=4.9406564584124654e-324 /D__DBL_DIG__=15 /D__DBL_EPSILON__=2.2204460492503131e-16 /D__DBL_HAS_DENORM__=1 /D__DBL_HAS_INFINITY__=1 /D__DBL_HAS_QUIET_NAN__=1 /D__DBL_MANT_DIG__=53 /D__DBL_MAX_10_EXP__=308 /D__DBL_MAX_EXP__=1024 /D__DBL_MAX__=1.7976931348623157e+308 /D__DBL_MIN_10_EXP__=(-307) /D__DBL_MIN_EXP__=(-1021) /D__DBL_MIN__=2.2250738585072014e-308 /D__DBL_NORM_MAX__=1.7976931348623157e+308 /D__DECIMAL_DIG__=__LDBL_DECIMAL_DIG__ /D__ELF__=1 /D__FINITE_MATH_ONLY__=0 /D__FLOAT128__=1 /D__FLT16_DECIMAL_DIG__=5 /D__FLT16_DENORM_MIN__=5.9604644775390625e-8F16 /D__FLT16_DIG__=3 /D__FLT16_EPSILON__=9.765625e-4F16 /D__FLT16_HAS_DENORM__=1 /D__FLT16_HAS_INFINITY__=1 /D__FLT16_HAS_QUIET_NAN__=1 /D__FLT16_MANT_DIG__=11 /D__FLT16_MAX_10_EXP__=4 /D__FLT16_MAX_EXP__=16 /D__FLT16_MAX__=6.5504e+4F16 /D__FLT16_MIN_10_EXP__=(-4) /D__FLT16_MIN_EXP__=(-13) /D__FLT16_MIN__=6.103515625e-5F16 /D__FLT16_NORM_MAX__=6.5504e+4F16 /D__FLT_DECIMAL_DIG__=9 /D__FLT_DENORM_MIN__=1.40129846e-45F /D__FLT_DIG__=6 /D__FLT_EPSILON__=1.19209290e-7F /D__FLT_HAS_DENORM__=1 /D__FLT_HAS_INFINITY__=1 /D__FLT_HAS_QUIET_NAN__=1 /D__FLT_MANT_DIG__=24 /D__FLT_MAX_10_EXP__=38 /D__FLT_MAX_EXP__=128 /D__FLT_MAX__=3.40282347e+38F /D__FLT_MIN_10_EXP__=(-37) /D__FLT_MIN_EXP__=(-125) /D__FLT_MIN__=1.17549435e-38F /D__FLT_NORM_MAX__=3.40282347e+38F /D__FLT_RADIX__=2 /D__FPCLASS_NEGINF=0x0004 /D__FPCLASS_NEGNORMAL=0x0008 /D__FPCLASS_NEGSUBNORMAL=0x0010 /D__FPCLASS_NEGZERO=0x0020 /D__FPCLASS_POSINF=0x0200 /D__FPCLASS_POSNORMAL=0x0100 /D__FPCLASS_POSSUBNORMAL=0x0080 /D__FPCLASS_POSZERO=0x0040 /D__FPCLASS_QNAN=0x0002 /D__FPCLASS_SNAN=0x0001 /D__FXSR__=1 /D__GCC_ASM_FLAG_OUTPUTS__=1 /D__GCC_ATOMIC_BOOL_LOCK_FREE=2 /D__GCC_ATOMIC_CHAR16_T_LOCK_FREE=2 /D__GCC_ATOMIC_CHAR32_T_LOCK_FREE=2 /D__GCC_ATOMIC_CHAR_LOCK_FREE=2 /D__GCC_ATOMIC_INT_LOCK_FREE=2 /D__GCC_ATOMIC_LLONG_LOCK_FREE=2 /D__GCC_ATOMIC_LONG_LOCK_FREE=2 /D__GCC_ATOMIC_POINTER_LOCK_FREE=2 /D__GCC_ATOMIC_SHORT_LOCK_FREE=2 /D__GCC_ATOMIC_TEST_AND_SET_TRUEVAL=1 /D__GCC_ATOMIC_WCHAR_T_LOCK_FREE=2 /D__GCC_CONSTRUCTIVE_SIZE=64 /D__GCC_DESTRUCTIVE_SIZE=64 /D__GCC_HAVE_DWARF2_CFI_ASM=1 /D__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1=1 /D__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2=1 /D__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4=1 /D__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8=1 /D__GNUC_MINOR__=2 /D__GNUC_PATCHLEVEL__=1 /D__GNUC_STDC_INLINE__=1 /D__GNUC__=4 /D__GXX_ABI_VERSION=1002 /D__INT16_C_SUFFIX__= /D"__INT16_FMTd__=\"hd\"" /D"__INT16_FMTi__=\"hi\"" /D__INT16_MAX__=32767 /D__INT16_TYPE__=short /D__INT32_C_SUFFIX__= /D"__INT32_FMTd__=\"d\"" /D"__INT32_FMTi__=\"i\"" /D__INT32_MAX__=2147483647 /D__INT32_TYPE__=int /D__INT64_C_SUFFIX__=L /D"__INT64_FMTd__=\"ld\"" /D"__INT64_FMTi__=\"li\"" /D__INT64_MAX__=9223372036854775807L /D"__INT64_TYPE__=long int" /D__INT8_C_SUFFIX__= /D"__INT8_FMTd__=\"hhd\"" /D"__INT8_FMTi__=\"hhi\"" /D__INT8_MAX__=127 /D"__INT8_TYPE__=signed char" /D__INTMAX_C_SUFFIX__=L /D"__INTMAX_FMTd__=\"ld\"" /D"__INTMAX_FMTi__=\"li\"" /D__INTMAX_MAX__=9223372036854775807L /D"__INTMAX_TYPE__=long int" /D__INTMAX_WIDTH__=64 /D"__INTPTR_FMTd__=\"ld\"" /D"__INTPTR_FMTi__=\"li\"" /D__I…
  edge args (406):
    --c
    -I$PROJECT
    --sys_include=/usr/lib/llvm-19/lib/clang/19/include
    --sys_include=/usr/local/include
    --sys_include=/usr/include/x86_64-linux-gnu
    --sys_include=/usr/include
    -D_LP64=1
    -D__ATOMIC_ACQUIRE=2
    -D__ATOMIC_ACQ_REL=4
    -D__ATOMIC_CONSUME=1
    -D__ATOMIC_RELAXED=0
    -D__ATOMIC_RELEASE=3
    -D__ATOMIC_SEQ_CST=5
    -D__BIGGEST_ALIGNMENT__=16
    -D__BITINT_MAXWIDTH__=8388608
    -D__BOOL_WIDTH__=8
    -D__BYTE_ORDER__=__ORDER_LITTLE_ENDIAN__
    -D__CHAR16_TYPE__=unsigned short
    -D__CHAR32_TYPE__=unsigned int
    -D__CHAR_BIT__=8
    -D__CLANG_ATOMIC_BOOL_LOCK_FREE=2
    -D__CLANG_ATOMIC_CHAR16_T_LOCK_FREE=2
    -D__CLANG_ATOMIC_CHAR32_T_LOCK_FREE=2
    -D__CLANG_ATOMIC_CHAR_LOCK_FREE=2
    -D__CLANG_ATOMIC_INT_LOCK_FREE=2
    -D__CLANG_ATOMIC_LLONG_LOCK_FREE=2
    -D__CLANG_ATOMIC_LONG_LOCK_FREE=2
    -D__CLANG_ATOMIC_POINTER_LOCK_FREE=2
    -D__CLANG_ATOMIC_SHORT_LOCK_FREE=2
    -D__CLANG_ATOMIC_WCHAR_T_LOCK_FREE=2
    -D__CONSTANT_CFSTRINGS__=1
    -D__DBL_DECIMAL_DIG__=17
    -D__DBL_DENORM_MIN__=4.9406564584124654e-324
    -D__DBL_DIG__=15
    -D__DBL_EPSILON__=2.2204460492503131e-16
    -D__DBL_HAS_DENORM__=1
    -D__DBL_HAS_INFINITY__=1
    -D__DBL_HAS_QUIET_NAN__=1
    -D__DBL_MANT_DIG__=53
    -D__DBL_MAX_10_EXP__=308
    -D__DBL_MAX_EXP__=1024
    -D__DBL_MAX__=1.7976931348623157e+308
    -D__DBL_MIN_10_EXP__=(-307)
    -D__DBL_MIN_EXP__=(-1021)
    -D__DBL_MIN__=2.2250738585072014e-308
    -D__DBL_NORM_MAX__=1.7976931348623157e+308
    -D__DECIMAL_DIG__=__LDBL_DECIMAL_DIG__
    -D__ELF__=1
    -D__FINITE_MATH_ONLY__=0
    -D__FLOAT128__=1
    -D__FLT16_DECIMAL_DIG__=5
    -D__FLT16_DENORM_MIN__=5.9604644775390625e-8F16
    -D__FLT16_DIG__=3
    -D__FLT16_EPSILON__=9.765625e-4F16
    -D__FLT16_HAS_DENORM__=1
    -D__FLT16_HAS_INFINITY__=1
    -D__FLT16_HAS_QUIET_NAN__=1
    -D__FLT16_MANT_DIG__=11
    -D__FLT16_MAX_10_EXP__=4
    -D__FLT16_MAX_EXP__=16
    -D__FLT16_MAX__=6.5504e+4F16
    -D__FLT16_MIN_10_EXP__=(-4)
    -D__FLT16_MIN_EXP__=(-13)
    -D__FLT16_MIN__=6.103515625e-5F16
    -D__FLT16_NORM_MAX__=6.5504e+4F16
    -D__FLT_DECIMAL_DIG__=9
    -D__FLT_DENORM_MIN__=1.40129846e-45F
    -D__FLT_DIG__=6
    -D__FLT_EPSILON__=1.19209290e-7F
    -D__FLT_HAS_DENORM__=1
    -D__FLT_HAS_INFINITY__=1
    -D__FLT_HAS_QUIET_NAN__=1
    -D__FLT_MANT_DIG__=24
    -D__FLT_MAX_10_EXP__=38
    -D__FLT_MAX_EXP__=128
    -D__FLT_MAX__=3.40282347e+38F
    -D__FLT_MIN_10_EXP__=(-37)
    -D__FLT_MIN_EXP__=(-125)
    -D__FLT_MIN__=1.17549435e-38F
    -D__FLT_NORM_MAX__=3.40282347e+38F
    -D__FLT_RADIX__=2
    -D__FPCLASS_NEGINF=0x0004
    -D__FPCLASS_NEGNORMAL=0x0008
    -D__FPCLASS_NEGSUBNORMAL=0x0010
    -D__FPCLASS_NEGZERO=0x0020
    -D__FPCLASS_POSINF=0x0200
    -D__FPCLASS_POSNORMAL=0x0100
    -D__FPCLASS_POSSUBNORMAL=0x0080
    -D__FPCLASS_POSZERO=0x0040
    -D__FPCLASS_QNAN=0x0002
    -D__FPCLASS_SNAN=0x0001
    -D__FXSR__=1
    -D__GCC_ASM_FLAG_OUTPUTS__=1
    -D__GCC_ATOMIC_BOOL_LOCK_FREE=2
    -D__GCC_ATOMIC_CHAR16_T_LOCK_FREE=2
    -D__GCC_ATOMIC_CHAR32_T_LOCK_FREE=2
    -D__GCC_ATOMIC_CHAR_LOCK_FREE=2
    -D__GCC_ATOMIC_INT_LOCK_FREE=2
    -D__GCC_ATOMIC_LLONG_LOCK_FREE=2
    -D__GCC_ATOMIC_LONG_LOCK_FREE=2
    -D__GCC_ATOMIC_POINTER_LOCK_FREE=2
    -D__GCC_ATOMIC_SHORT_LOCK_FREE=2
    -D__GCC_ATOMIC_TEST_AND_SET_TRUEVAL=1
    -D__GCC_ATOMIC_WCHAR_T_LOCK_FREE=2
    -D__GCC_CONSTRUCTIVE_SIZE=64
    -D__GCC_DESTRUCTIVE_SIZE=64
    -D__GCC_HAVE_DWARF2_CFI_ASM=1
    -D__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1=1
    -D__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2=1
    -D__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4=1
    -D__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8=1
    -D__GNUC_MINOR__=2
    -D__GNUC_PATCHLEVEL__=1
    -D__GNUC_STDC_INLINE__=1
    -D__GNUC__=4
    -D__GXX_ABI_VERSION=1002
    -D__INT16_C_SUFFIX__=
    -D__INT16_FMTd__="hd"
    -D__INT16_FMTi__="hi"
    -D__INT16_MAX__=32767
    -D__INT16_TYPE__=short
    -D__INT32_C_SUFFIX__=
    -D__INT32_FMTd__="d"
    -D__INT32_FMTi__="i"
    -D__INT32_MAX__=2147483647
    -D__INT32_TYPE__=int
    -D__INT64_C_SUFFIX__=L
    -D__INT64_FMTd__="ld"
    -D__INT64_FMTi__="li"
    -D__INT64_MAX__=9223372036854775807L
    -D__INT64_TYPE__=long int
    -D__INT8_C_SUFFIX__=
    -D__INT8_FMTd__="hhd"
    -D__INT8_FMTi__="hhi"
    -D__INT8_MAX__=127
    -D__INT8_TYPE__=signed char
    -D__INTMAX_C_SUFFIX__=L
    -D__INTMAX_FMTd__="ld"
    -D__INTMAX_FMTi__="li"
    -D__INTMAX_MAX__=9223372036854775807L
    -D__INTMAX_TYPE__=long int
    -D__INTMAX_WIDTH__=64
    -D__INTPTR_FMTd__="ld"
    -D__INTPTR_FMTi__="li"
    -D__INTPTR_MAX__=9223372036854775807L
    -D__INTPTR_TYPE__=long int
    -D__INTPTR_WIDTH__=64
    -D__INT_FAST16_FMTd__="hd"
    -D__INT_FAST16_FMTi__="hi"
    -D__INT_FAST16_MAX__=32767
    -D__INT_FAST16_TYPE__=short
    -D__INT_FAST16_WIDTH__=16
    -D__INT_FAST32_FMTd__="d"
    -D__INT_FAST32_FMTi__="i"
    -D__INT_FAST32_MAX__=2147483647
    -D__INT_FAST32_TYPE__=int
    -D__INT_FAST32_WIDTH__=32
    -D__INT_FAST64_FMTd__="ld"
    -D__INT_FAST64_FMTi__="li"
    -D__INT_FAST64_MAX__=9223372036854775807L
    -D__INT_FAST64_TYPE__=long int
    -D__INT_FAST64_WIDTH__=64
    -D__INT_FAST8_FMTd__="hhd"
    -D__INT_FAST8_FMTi__="hhi"
    -D__INT_FAST8_MAX__=127
    -D__INT_FAST8_TYPE__=signed char
    -D__INT_FAST8_WIDTH__=8
    -D__INT_LEAST16_FMTd__="hd"
    -D__INT_LEAST16_FMTi__="hi"
    -D__INT_LEAST16_MAX__=32767
    -D__INT_LEAST16_TYPE__=short
    -D__INT_LEAST16_WIDTH__=16
    -D__INT_LEAST32_FMTd__="d"
    -D__INT_LEAST32_FMTi__="i"
    -D__INT_LEAST32_MAX__=2147483647
    -D__INT_LEAST32_TYPE__=int
    -D__INT_LEAST32_WIDTH__=32
    -D__INT_LEAST64_FMTd__="ld"
    -D__INT_LEAST64_FMTi__="li"
    -D__INT_LEAST64_MAX__=9223372036854775807L
    -D__INT_LEAST64_TYPE__=long int
    -D__INT_LEAST64_WIDTH__=64
    -D__INT_LEAST8_FMTd__="hhd"
    -D__INT_LEAST8_FMTi__="hhi"
    -D__INT_LEAST8_MAX__=127
    -D__INT_LEAST8_TYPE__=signed char
    -D__INT_LEAST8_WIDTH__=8
    -D__INT_MAX__=2147483647
    -D__INT_WIDTH__=32
    -D__LDBL_DECIMAL_DIG__=21
    -D__LDBL_DENORM_MIN__=3.64519953188247460253e-4951L
    -D__LDBL_DIG__=18
    -D__LDBL_EPSILON__=1.08420217248550443401e-19L
    -D__LDBL_HAS_DENORM__=1
    -D__LDBL_HAS_INFINITY__=1
    -D__LDBL_HAS_QUIET_NAN__=1
    -D__LDBL_MANT_DIG__=64
    -D__LDBL_MAX_10_EXP__=4932
    -D__LDBL_MAX_EXP__=16384
    -D__LDBL_MAX__=1.18973149535723176502e+4932L
    -D__LDBL_MIN_10_EXP__=(-4931)
    -D__LDBL_MIN_EXP__=(-16381)
    -D__LDBL_MIN__=3.36210314311209350626e-4932L
    -D__LDBL_NORM_MAX__=1.18973149535723176502e+4932L
    -D__LITTLE_ENDIAN__=1
    -D__LLONG_WIDTH__=64
    -D__LONG_LONG_MAX__=9223372036854775807LL
    -D__LONG_MAX__=9223372036854775807L
    -D__LONG_WIDTH__=64
    -D__LP64__=1
    -D__MEMORY_SCOPE_DEVICE=1
    -D__MEMORY_SCOPE_SINGLE=4
    -D__MEMORY_SCOPE_SYSTEM=0
    -D__MEMORY_SCOPE_WRKGRP=2
    -D__MEMORY_SCOPE_WVFRNT=3
    -D__MMX__=1
    -D__NO_INLINE__=1
    -D__NO_MATH_INLINES=1
    -D__OBJC_BOOL_IS_BOOL=0
    -D__OPENCL_MEMORY_SCOPE_ALL_SVM_DEVICES=3
    -D__OPENCL_MEMORY_SCOPE_DEVICE=2
    -D__OPENCL_MEMORY_SCOPE_SUB_GROUP=4
    -D__OPENCL_MEMORY_SCOPE_WORK_GROUP=1
    -D__OPENCL_MEMORY_SCOPE_WORK_ITEM=0
    -D__ORDER_BIG_ENDIAN__=4321
    -D__ORDER_LITTLE_ENDIAN__=1234
    -D__ORDER_PDP_ENDIAN__=3412
    -D__PIC__=2
    -D__PIE__=2
    -D__POINTER_WIDTH__=64
    -D__PRAGMA_REDEFINE_EXTNAME=1
    -D__PTRDIFF_FMTd__="ld"
    -D__PTRDIFF_FMTi__="li"
    -D__PTRDIFF_MAX__=9223372036854775807L
    -D__PTRDIFF_TYPE__=long int
    -D__PTRDIFF_WIDTH__=64
    -D__REGISTER_PREFIX__=
    -D__SCHAR_MAX__=127
    -D__SEG_FS=1
    -D__SEG_GS=1
    -D__SHRT_MAX__=32767
    -D__SHRT_WIDTH__=16
    -D__SIG_ATOMIC_MAX__=2147483647
    -D__SIG_ATOMIC_WIDTH__=32
    -D__SIZEOF_DOUBLE__=8
    -D__SIZEOF_FLOAT128__=16
    -D__SIZEOF_FLOAT__=4
    -D__SIZEOF_INT128__=16
    -D__SIZEOF_INT__=4
    -D__SIZEOF_LONG_DOUBLE__=16
    -D__SIZEOF_LONG_LONG__=8
    -D__SIZEOF_LONG__=8
    -D__SIZEOF_POINTER__=8
    -D__SIZEOF_PTRDIFF_T__=8
    -D__SIZEOF_SHORT__=2
    -D__SIZEOF_SIZE_T__=8
    -D__SIZEOF_WCHAR_T__=4
    -D__SIZEOF_WINT_T__=4
    -D__SIZE_FMTX__="lX"
    -D__SIZE_FMTo__="lo"
    -D__SIZE_FMTu__="lu"
    -D__SIZE_FMTx__="lx"
    -D__SIZE_MAX__=18446744073709551615UL
    -D__SIZE_TYPE__=long unsigned int
    -D__SIZE_WIDTH__=64
    -D__SSE2_MATH__=1
    -D__SSE2__=1
    -D__SSE_MATH__=1
    -D__SSE__=1
    -D__STDC_EMBED_EMPTY__=2
    -D__STDC_EMBED_FOUND__=1
    -D__STDC_EMBED_NOT_FOUND__=0
    -D__STDC_HOSTED__=1
    -D__STDC_UTF_16__=1
    -D__STDC_UTF_32__=1
    -D__STDC_VERSION__=201710L
    -D__STDC__=1
    -D__STRICT_ANSI__=1
    -D__UINT16_C_SUFFIX__=
    -D__UINT16_FMTX__="hX"
    -D__UINT16_FMTo__="ho"
    -D__UINT16_FMTu__="hu"
    -D__UINT16_FMTx__="hx"
    -D__UINT16_MAX__=65535
    -D__UINT16_TYPE__=unsigned short
    -D__UINT32_C_SUFFIX__=U
    -D__UINT32_FMTX__="X"
    -D__UINT32_FMTo__="o"
    -D__UINT32_FMTu__="u"
    -D__UINT32_FMTx__="x"
    -D__UINT32_MAX__=4294967295U
    -D__UINT32_TYPE__=unsigned int
    -D__UINT64_C_SUFFIX__=UL
    -D__UINT64_FMTX__="lX"
    -D__UINT64_FMTo__="lo"
    -D__UINT64_FMTu__="lu"
    -D__UINT64_FMTx__="lx"
    -D__UINT64_MAX__=18446744073709551615UL
    -D__UINT64_TYPE__=long unsigned int
    -D__UINT8_C_SUFFIX__=
    -D__UINT8_FMTX__="hhX"
    -D__UINT8_FMTo__="hho"
    -D__UINT8_FMTu__="hhu"
    -D__UINT8_FMTx__="hhx"
    -D__UINT8_MAX__=255
    -D__UINT8_TYPE__=unsigned char
    -D__UINTMAX_C_SUFFIX__=UL
    -D__UINTMAX_FMTX__="lX"
    -D__UINTMAX_FMTo__="lo"
    -D__UINTMAX_FMTu__="lu"
    -D__UINTMAX_FMTx__="lx"
    -D__UINTMAX_MAX__=18446744073709551615UL
    -D__UINTMAX_TYPE__=long unsigned int
    -D__UINTMAX_WIDTH__=64
    -D__UINTPTR_FMTX__="lX"
    -D__UINTPTR_FMTo__="lo"
    -D__UINTPTR_FMTu__="lu"
    -D__UINTPTR_FMTx__="lx"
    -D__UINTPTR_MAX__=18446744073709551615UL
    -D__UINTPTR_TYPE__=long unsigned int
    -D__UINTPTR_WIDTH__=64
    -D__UINT_FAST16_FMTX__="hX"
    -D__UINT_FAST16_FMTo__="ho"
    -D__UINT_FAST16_FMTu__="hu"
    -D__UINT_FAST16_FMTx__="hx"
    -D__UINT_FAST16_MAX__=65535
    -D__UINT_FAST16_TYPE__=unsigned short
    -D__UINT_FAST32_FMTX__="X"
    -D__UINT_FAST32_FMTo__="o"
    -D__UINT_FAST32_FMTu__="u"
    -D__UINT_FAST32_FMTx__="x"
    -D__UINT_FAST32_MAX__=4294967295U
    -D__UINT_FAST32_TYPE__=unsigned int
    -D__UINT_FAST64_FMTX__="lX"
    -D__UINT_FAST64_FMTo__="lo"
    -D__UINT_FAST64_FMTu__="lu"
    -D__UINT_FAST64_FMTx__="lx"
    -D__UINT_FAST64_MAX__=18446744073709551615UL
    -D__UINT_FAST64_TYPE__=long unsigned int
    -D__UINT_FAST8_FMTX__="hhX"
    -D__UINT_FAST8_FMTo__="hho"
    -D__UINT_FAST8_FMTu__="hhu"
    -D__UINT_FAST8_FMTx__="hhx"
    -D__UINT_FAST8_MAX__=255
    -D__UINT_FAST8_TYPE__=unsigned char
    -D__UINT_LEAST16_FMTX__="hX"
    -D__UINT_LEAST16_FMTo__="ho"
    -D__UINT_LEAST16_FMTu__="hu"
    -D__UINT_LEAST16_FMTx__="hx"
    -D__UINT_LEAST16_MAX__=65535
    -D__UINT_LEAST16_TYPE__=unsigned short
    -D__UINT_LEAST32_FMTX__="X"
    -D__UINT_LEAST32_FMTo__="o"
    -D__UINT_LEAST32_FMTu__="u"
    -D__UINT_LEAST32_FMTx__="x"
    -D__UINT_LEAST32_MAX__=4294967295U
    -D__UINT_LEAST32_TYPE__=unsigned int
    -D__UINT_LEAST64_FMTX__="lX"
    -D__UINT_LEAST64_FMTo__="lo"
    -D__UINT_LEAST64_FMTu__="lu"
    -D__UINT_LEAST64_FMTx__="lx"
    -D__UINT_LEAST64_MAX__=18446744073709551615UL
    -D__UINT_LEAST64_TYPE__=long unsigned int
    -D__UINT_LEAST8_FMTX__="hhX"
    -D__UINT_LEAST8_FMTo__="hho"
    -D__UINT_LEAST8_FMTu__="hhu"
    -D__UINT_LEAST8_FMTx__="hhx"
    -D__UINT_LEAST8_MAX__=255
    -D__UINT_LEAST8_TYPE__=unsigned char
    -D__USER_LABEL_PREFIX__=
    -D__VERSION__="Debian Clang 19.1.7 (3+b1)"
    -D__WCHAR_MAX__=2147483647
    -D__WCHAR_TYPE__=int
    -D__WCHAR_WIDTH__=32
    -D__WINT_MAX__=4294967295U
    -D__WINT_TYPE__=unsigned int
    -D__WINT_UNSIGNED__=1
    -D__WINT_WIDTH__=32
    -D__amd64=1
    -D__amd64__=1
    -D__clang__=1
    -D__clang_literal_encoding__="UTF-8"
    -D__clang_major__=19
    -D__clang_minor__=1
    -D__clang_patchlevel__=7
    -D__clang_version__="19.1.7 (3+b1)"
    -D__clang_wide_literal_encoding__="UTF-32"
    -D__code_model_small__=1
    -D__gnu_linux__=1
    -D__k8=1
    -D__k8__=1
    -D__linux=1
    -D__linux__=1
    -D__llvm__=1
    -D__pic__=2
    -D__pie__=2
    -D__seg_fs=__attribute__((address_space(257)))
    -D__seg_gs=__attribute__((address_space(256)))
    -D__tune_k8__=1
    -D__unix=1
    -D__unix__=1
    -D__x86_64=1
    -D__x86_64__=1
    --clang
    --clang_version=190107
    --c17
  intelliSenseMode: linux-clang-x64
Update IntelliSense time (sec): 0.118
LSP: (received) cpptools/getFoldingRanges: file://$PROJECT/test.c (id: 12)
LSP: (invoked) cpptools/getFoldingRanges: file://$PROJECT/test.c (id: 12)
LSP: Sending response (id: 12)
LSP: (received) cpptools/getCodeActions: file://$PROJECT/test.c (id: 13)
LSP: (invoked) cpptools/getCodeActions: file://$PROJECT/test.c (id: 13)
LSP: Sending response (id: 13)
LSP: (received) cpptools/getFoldingRanges: file://$PROJECT/test.c (id: 14)
LSP: (invoked) cpptools/getFoldingRanges: file://$PROJECT/test.c (id: 14)
LSP: Sending response (id: 14)
LSP: (received) cpptools/hover: file://$PROJECT/test.c (id: 15)
LSP: (invoked) cpptools/hover: file://$PROJECT/test.c (id: 15)
LSP: Sending response (id: 15)
LSP: (received) cpptools/getCodeActions: file://$PROJECT/test.c (id: 16)
LSP: (invoked) cpptools/getCodeActions: file://$PROJECT/test.c (id: 16)
LSP: Sending response (id: 16)
LSP: (received) cpptools/hover: file://$PROJECT/test.c (id: 17)
LSP: (invoked) cpptools/hover: file://$PROJECT/test.c (id: 17)
LSP: Sending response (id: 17)
LSP: (received) cpptools/hover: file://$PROJECT/test.c (id: 18)
LSP: (invoked) cpptools/hover: file://$PROJECT/test.c (id: 18)
LSP: Sending response (id: 18)
Other Extensions

I've confirmed this to occur with all extensions except ms-vscode.cpptools manually disabled.

code $(code --list-extensions | grep -v ms-vscode.cpptools | xargs -I % echo '--disable-extension %')

This is included in the reproduction steps.

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the .vscode/c_cpp_properties.json configuration and test.c reproduction, then run the shown clang -std=c17 command and inspect how IntelliSense handles the undeclared call to one(). Compare the compiler diagnostics with the single reported squiggle; done means IntelliSense reports the missing-prototype error for one under c17 as well as the incomplete struct error.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, vscode, wasm
Domain
compilers, devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.