Skip to content

create a double array without declare its length by new expression #182737

@shutianXD

Description

@shutianXD

Type: Bug

As you see, I have create a double array without declare its length by new expression. The VScode editor shows that I shouldn't do such thing, until I complement a integer 3 in the square bracket, the error disappeared.
image
But it's legal in the instance of "new expression" of cppreference.com, you can see it in the screenshot below.
image
I have set the cpp standard to gnu++17 in the c_cpp_properties.json. The cpp file above can be compiled normally, and the executable file can run normally as well. This is my first time to report question to VScode team, and I hope you can fix it in the next version if it's a true bug.

image
image

VS Code version: Code 1.78.2 (b3e4e68, 2023-05-10T14:39:26.248Z)
OS version: Windows_NT x64 10.0.22621
Modes:
Sandboxed: No
Remote OS version: Linux x64 5.15.0-58-generic

System Info
Item Value
CPUs AMD Ryzen 7 5800H with Radeon Graphics (16 x 3194)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
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
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 15.36GB (8.50GB free)
Process Argv --crash-reporter-id 1b08dbdd-f7a7-4edb-aab9-2e1cecd5a4e6
Screen Reader no
VM 67%
Item Value
Remote SSH: 8.130.66.42
OS Linux x64 5.15.0-58-generic
CPUs Intel(R) Xeon(R) Platinum 8269CY CPU @ 2.50GHz (2 x 2499)
Memory (System) 1.64GB (0.99GB free)
VM 100%
Extensions (13)
Extension Author (truncated) Version
jupyter-keymap ms- 1.1.0
remote-containers ms- 0.292.0
remote-ssh ms- 0.102.0
remote-ssh-edit ms- 0.86.0
remote-wsl ms- 0.78.5
vscode-remote-extensionpack ms- 0.24.0
remote-explorer ms- 0.4.0
remote-server ms- 1.1.0
vscode-language-pack-zh-hans MS- 1.78.2023051009
cmake-tools ms- 1.14.31
cpptools ms- 1.15.4
cpptools-extension-pack ms- 1.3.0
cmake twx 0.0.17

(2 theme extensions excluded)

A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscoreces:30445986
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593:30376534
pythonvs932:30410667
cppdebug:30492333
vscaat:30438848
vsclangdf:30486550
c4g48928:30535728
dsvsc012:30540252
pynewext54:30695312
azure-dev_surveyone:30548225
vsccc:30610678
3biah626:30602489
pyind779:30671433
f6dab269:30613381
pythonsymbol12:30671437
a9j8j154:30646983
showlangstatbar:30737416
vsccsb:30705552
azdwalk:30721579
pythonms35:30701012
pythonfmttext:30731395
pythoncmv:30739700
fixshowwlkth:30730052
showsbindicator:30730056
pythongtdpathcf:30739705

Metadata

Metadata

Assignees

Labels

*caused-by-extensionIssue identified to be caused by an extension

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions