-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
Language ServiceVisual StudioInherited from Visual StudioInherited from Visual StudiobugfixedCheck the Milestone for the release in which the fix is or will be available.Check the Milestone for the release in which the fix is or will be available.parser
Milestone
Description
Environment
- OS and Version: Windows 11
- VS Code Version: 1.103.2
- C/C++ Extension Version: 1.26.3
- If using SSH remote, specify OS of remote machine:
Bug Summary and Steps to Reproduce
Bug Summary:
#include <bit>
constexpr int bits = std::countl_zero<uint16_t>(0) - 1;
// intellisense reporting error:
// expression must have a constant valueC/C++(28)
// cannot call non-constexpr function "__builtin_clzg" (declared implicitly)Steps to reproduce:
- create a file using a std:count_zero and assign to a constexpr
- compile it with gcc and c++20
- compilation is succesful
- intellisense should highlight an error as reported in the comments in the code snippet above
Expected behavior:
intellisense should not report an error
Configuration and Logs
- c_cpp_properties.json no file
log diagnostic:
-------- Diagnostics - 8/26/2025, 12:04:05 AM
Version: 1.26.3
Current Configuration:
{
"name": "Win32",
"includePath": [
"c:/Users/myuser/source/repos/myrepo/**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"windowsSdkVersion": "10.0.26100.0",
"compilerPath": "cl.exe",
"cStandard": "c17",
"cppStandard": "c++17",
"intelliSenseMode": "windows-msvc-x64",
"compilerPathInCppPropertiesJson": "cl.exe",
"intelliSenseModeIsExplicit": false,
"cStandardIsExplicit": false,
"cppStandardIsExplicit": false,
"mergeConfigurations": false,
"recursiveIncludes": {},
"recursiveIncludesReduceIsExplicit": false,
"recursiveIncludesPriorityIsExplicit": false,
"recursiveIncludesOrderIsExplicit": false,
"compilerPathIsExplicit": false,
"configurationProvider": "ms-vscode.cmake-tools",
"browse": {
"limitSymbolsToIncludedHeaders": true
}
}
Additional Tracked Settings:
{
"editorTabSize": 4,
"editorInsertSpaces": true,
"editorAutoClosingBrackets": "languageDefined",
"filesEncoding": "utf8",
"filesAssociations": {
"bit": "cpp",
"system_error": "cpp",
"xmemory": "cpp",
"xstring": "cpp",
"functional": "cpp",
"fstream": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"tuple": "cpp",
"typeinfo": "cpp"
},
"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"
}
Custom browse configuration:
{
"browsePath": [
"c:/users/myuser/source/repos/myrepo/build/mysubrepo",
"c:/users/myuser/source/repos/myrepo/mysubrepo/src",
"c:/msys64/ucrt64/include/sdl2",
"c:/users/myuser/source/repos/myrepo/mysubrepo/examples",
"c:/users/myuser/source/repos/myrepo/build/cmakefiles",
"c:/users/myuser/source/repos/myrepo/mysubrepo/test",
"c:/users/myuser/source/repos/myrepo/mysubrepo/test/std",
],
"compilerPath": "c:/msys64/ucrt64/bin/g++.exe",
"compilerArgs": [],
"compilerFragments": [
"-g -std=gnu++20"
]
}
cpptools version (native): 1.26.3.0
Current database path: C:\USERS\myuser\APPDATA\LOCAL\MICROSOFT\VSCODE-CPPTOOLS\9AA52F4695B780FC51C3D0DF0D8FC15D\.BROWSE.VC.DB
Translation Unit Mappings:
[ C:\Users\myuser\source\repos\myrepo\myrepo\src\audio\converters\IRateConverter.cpp - source TU]:
C:\Users\myuser\source\repos\myrepo\myrepo\src\audio\converters\IRateConverter.hpp
Translation Unit Configurations:
[ C:\Users\myuser\source\repos\myrepo\myrepo\src\audio\converters\IRateConverter.cpp ]
Process ID: 27032
Memory Usage: 237 MB
Compiler Path: C:\msys64\ucrt64\bin\g++.exe
Include paths:
include: C:\Users\myuser\source\repos\myrepo\build\myrepo
include: C:\Users\myuser\source\repos\myrepo\myrepo\src
include: C:\msys64\ucrt64\include\SDL2
system include: C:\msys64\ucrt64\include\c++\15.1.0
system include: C:\msys64\ucrt64\include\c++\15.1.0\x86_64-w64-mingw32
system include: C:\msys64\ucrt64\include\c++\15.1.0\backward
system include: C:\msys64\ucrt64\lib\gcc\x86_64-w64-mingw32\15.1.0\include
system include: C:\msys64\ucrt64\include
system include: C:\msys64\ucrt64\lib\gcc\x86_64-w64-mingw32\15.1.0\include-fixed
Standard Version: c++20
IntelliSense Mode: windows-gcc-x64
Other Flags:
--g++
--gnu_version=150100
Total Memory Usage: 237 MB
------- Workspace parsing diagnostics -------
Number of files discovered (not excluded): 8179
Number of files parsed: 805Other Extensions
No response
Additional context
after dumping log diagnostic i noticed: "intelliSenseMode": "windows-msvc-x64"
then i edited to "intelliSenseMode": "windows-gcc-x64",, reset the intellisense db, but nothing change still same error displayed by intellisense.
Metadata
Metadata
Assignees
Labels
Language ServiceVisual StudioInherited from Visual StudioInherited from Visual StudiobugfixedCheck the Milestone for the release in which the fix is or will be available.Check the Milestone for the release in which the fix is or will be available.parser
Type
Projects
Status
Done