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
VSCode claims that the assignment to foo.bar below is an error "a value of type "struct Bar" cannot be assigned to an entity of type "struct Bar" C/C++(513)"
The code compiles cleanly both with gcc and clang (with -Wall -Wextra in both cases). I believe it is ISO C compliant, although a fairly uncommon usage. (In C nested, named, structs become part of the global namespace, which is different from C++.)
// C not C++.structFoo {
structBar {
intx;
} bar;
};
intmain(void)
{
structFoofoo;
foo.bar= (structBar) {0}; // Incorrectly marked as an error by VSCode.returnfoo.bar.x;
}
Extension version: 1.22.11
VS Code version: Code 1.95.3 (f1a4fb101478ce6ec82fe9627c43efbf9e98c813, 2024-11-13T14:50:04.152Z)
OS version: Linux x64 6.11.7-300.fc41.x86_64
Modes:
System Info
Item
Value
CPUs
Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz (8 x 3700)
Type: Bug
VSCode claims that the assignment to
foo.bar
below is an error "a value of type "struct Bar" cannot be assigned to an entity of type "struct Bar" C/C++(513)"The code compiles cleanly both with gcc and clang (with -Wall -Wextra in both cases). I believe it is ISO C compliant, although a fairly uncommon usage. (In C nested, named, structs become part of the global namespace, which is different from C++.)
Extension version: 1.22.11
VS Code version: Code 1.95.3 (f1a4fb101478ce6ec82fe9627c43efbf9e98c813, 2024-11-13T14:50:04.152Z)
OS version: Linux x64 6.11.7-300.fc41.x86_64
Modes:
System Info
canvas_oop_rasterization: enabled_on
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
video_decode: enabled
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
webnn: disabled_off
A/B Experiments
The text was updated successfully, but these errors were encountered: