False positive expression must have a constant value
error in const struct initialization
#12983
Labels
Milestone
Environment
Bug Summary and Steps to Reproduce
Bug Summary:
VSCode reports a false positive
expression must have a constant value
error when constructing a const struct with a struct member that is being copy assigned from an existing const struct instance.Steps to reproduce:
Expected behavior:
No error should be reported in this case.
Configuration and Logs
Other Extensions
No response
Additional context
The following is a minimal code example reproducing the issue:
The code compiles and runs without issues as expected with gcc.exe and g++.exe (version 14.2.0) from UCRT64/MSYS2.
The text was updated successfully, but these errors were encountered: