Skip to content

intellisense incorrectly reports error on enum definition and initialization #14726

Description

@whatsinapbl

Type: Bug

the following code at global scope:

enum
{
   PS_Ground,
   PS_Air,
} player_state = PS_Ground;

causes intellisense to falsely report

a value of type "enum <unnamed>" cannot be used to initialize an entity of type "enum <unnamed>"C/C++(144)

Extension version: 1.33.8
VS Code version: Code 1.108.2 (c9d77990917f3102ada88be140d28b038d1dd7c7, 2026-01-21T13:52:09.270Z)
OS version: Windows_NT x64 10.0.19045
Modes: Unsupported

System Info
Item Value
CPUs 12th Gen Intel(R) Core(TM) i9-12900K (24 x 3187)
GPU Status 2d_canvas: enabled
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
trees_in_viz: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 63.75GB (37.54GB free)
Process Argv --crash-reporter-id 5b0c14a8-0995-4ea9-b825-4e47b3a80039
Screen Reader no
VM 0%
A/B Experiments
vsliv368:30146709
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31463988
aj953862:31281341
envsactivate1:31551504
cloudbuttont:31379625
42190218_ostrepl:31403339
55ia6109:31457054
ec5jj548:31422691
cp_cls_t_966_ss:31526232
8hhj4413:31478653
ge8j1254_inline_auto_hint_haiku:31491949
cp_cls_c_1081:31454833
conptydll_true:31498968
nes-slash-models-on:31463706
e9c30283:31461165
nes-extended-on:31455476
chat:31457767
githubstableflight:31469463
ddid_c:31478207
cp_cls_t_1082:31535311
db5d2638:31499441
jb_cp_cls_t_632:31543129
56dj4588:31512888
ha629193:31508444
jbcp_cls_pctr_t:31531130
cp_intellij_t_nes:31548657
jf4hg949:31526829
ihg5j128:31534457
9gg7f176:31542112
1h923230:31564177
0dg73464:31554319
treatment-23-1:31555779
unuse_dynamic_mcp:31555281
mangle-name-control:31572633

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Language ServicebugfixedCheck the Milestone for the release in which the fix is or will be available.verifiedBug has been reproduced

Type

Projects

  • Status
    Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions