You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
IntelliSense bug with preprocessor __COUNTER__ #9056
OS and Version: Windows 10 Pro Build 19041.vb_release.191206-1406
VS Code Version: 1.65.2
C/C++ Extension Version: 1.9.5
Other extensions you installed (and if the issue persists after disabling them): None
If using SSH remote, specify OS of remote machine:
Single file example of the bug. When you hover enum, Intellisense works incorrectly with __COUNTER__, it shows different numbers every time, but with hovering testing::a it works correctly
Steps to reproduce
Use code sample
Hover enums and everytime it will show you different number
Repeat second step
See error
Expected behavior
I expect to see constant value
Code sample and logs
Code sample enum testing { a = __COUNTER__, b = __COUNTER__, c = __COUNTER__, d = __COUNTER__ };
Configurations in c_cpp_properties.json
Logs from running C/C++: Log Diagnostics from the VS Code command palette
Thank you for the report. We’re closing this as not planned.
The linked VS bug was closed as lower priority which means we will not be getting a fix in VS Code either.
Activity
sean-mcmanus commentedon Mar 21, 2022
This is https://developercommunity2.visualstudio.com/t/Intellisense-__COUNTER__-macro/739122 -- it was closed as low priority. You could try re-filing it.
bobbrow commentedon Mar 19, 2026
Thank you for the report. We’re closing this as not planned.
The linked VS bug was closed as lower priority which means we will not be getting a fix in VS Code either.