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
The CMake build system generated by cmsis-toolbox has inconsistent support for some standards:
The GNU variants for C standards c17 (gnu17) and c23 (gnu23) are missing. This is unexpected, since the non-GNU variant is supported
The C++ standards c++20 and gnu++20 are incorrectly mapped to c++17 and gnu++17, leading to confusing behaviour. Either c++20 should be accepted and lead to actual C++20 support being enabled in the compiler, or c++20 should be rejected. Accepting c++20 and silently downgrading to c++17 is confusing.
As an additional enhancement, the following missing language standards should be added:
c++23
gnu++23
To Reproduce
Specify language-C: gnu17 or language-C: gnu23 in a .cproject.yml file and attempt to build the project. The build fails with unknown 'language' value 'gnu17' !.
Specify language-CPP: c++20 or language-CPP: gnu++20 in a .cproject.yml file and attempt to build a project containing C++20 features (such as requires clauses). The build fails with C++ syntax errors due to the mode not being C++20.
Expected behavior
Language standard support should be consistent and either correctly passed to the compiler or not implemented.
Environment (please complete the following information):
Describe the bug
The CMake build system generated by
cmsis-toolbox
has inconsistent support for some standards:c17
(gnu17
) andc23
(gnu23
) are missing. This is unexpected, since the non-GNU variant is supportedc++20
andgnu++20
are incorrectly mapped toc++17
andgnu++17
, leading to confusing behaviour. Eitherc++20
should be accepted and lead to actual C++20 support being enabled in the compiler, orc++20
should be rejected. Acceptingc++20
and silently downgrading toc++17
is confusing.As an additional enhancement, the following missing language standards should be added:
c++23
gnu++23
To Reproduce
Specify
language-C: gnu17
orlanguage-C: gnu23
in a .cproject.yml file and attempt to build the project. The build fails withunknown 'language' value 'gnu17' !
.Specify
language-CPP: c++20
orlanguage-CPP: gnu++20
in a .cproject.yml file and attempt to build a project containing C++20 features (such asrequires
clauses). The build fails with C++ syntax errors due to the mode not being C++20.Expected behavior
Language standard support should be consistent and either correctly passed to the compiler or not implemented.
Environment (please complete the following information):
cmsis-toolbox 2.6.0
armclang 6.21.0
Additional context
New issue as suggested in #1703.
The text was updated successfully, but these errors were encountered: