[BUG] STM32CubeIDE for VS Code generates -std=gnu11 for C++ with ST Arm Clang
I've come across an issue where the generated cmake/flags.cmake contains an error causing the build to fail for .cpp files.
The same file is generated when creating a new empty project with clang toolchain.
STM32CubeIDE for Visual Studio Code: 3.10.0
Toolchain: ST Arm Clang 21.1.1
MCU: STM32H723ZGT6
Generated in cmake/flags.cmake:
$<$<COMPILE_LANGUAGE:CXX>:
...
-std=gnu11
>
Result:
[build] error: invalid argument '-std=gnu11' not allowed with 'C++'
Removing -std=gnu11 from the CXX section of flags.cmake fixes the build.
