2024-05-08 6:33 AM - edited 2024-05-08 6:33 AM
Are there any plans to upgrade STM32CubeIDE to include support for C23?
It would be nice to have as it brings things like constexpr in, which makes the use of constants much better as they are subject to compiler checking and can call (constexpr) functions.
Solved! Go to Solution.
2024-06-03 2:47 AM
Hello @CTapp.1
First let me thank you for posting and sorry for the late reply.
The C+23 features are available from the GCC 13 which is not supported via STM32CubeIDE.
The request is raised internally for further analysis.
KR,
Semer.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-06-03 2:47 AM
Hello @CTapp.1
First let me thank you for posting and sorry for the late reply.
The C+23 features are available from the GCC 13 which is not supported via STM32CubeIDE.
The request is raised internally for further analysis.
KR,
Semer.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-07-09 3:44 PM
Would be really nice to have at least GNU extensions for C23 (`-std=gnu2x`).
Code like so: `int x = 0b00010000` or so: `int x = {}` produces warnings with `-Wpedantic` options, which is less than ideal, given that this is valid C and compiler recognize it and compiles just fine.
I believe the only bit missing here is the compiler flag set. If i add this flag in "Miscellaneous" then code compiles without warnings.
But the best would be indeed to have proper GCC13, GCC14 or even GCC15, and IMO would be also great to have C++23 support even if it is yet incomplete.
2025-07-09 11:22 PM
@alt Before C23 syntax 0b.... is a GNU extension. So compile with -std=gnu*** .
2025-07-12 2:58 AM
I'm just saying that it would be good to have GNU's C2X available in settings
Right now the top available C revisions are ISO C18 and GNU18, i need to set `-std=gnu2x` manually in "Miscellaneous" and unset C revision in "General" to "GCC default".
This is not a very obvious way to do that, GNU2X would be more obvious way to select the latest C revision available, given that compiler provided with toolchain support it anyway, and there are other GNU extension in the list as well, but not the GNU2X.
2025-07-12 3:31 AM - edited 2025-07-12 3:46 AM
A toolchain with GCC 14.3 is already available and it supports -std:c23 though some features are not implemented yet (bitints ...)
https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads
You can install it into CubeIDE with the Toolchain manager. Specify custom compiler options if CubeIDE GUI does not know about C23.