Skip to main content
CTapp.1
Senior III
May 8, 2024
Solved

C23 support

  • May 8, 2024
  • 2 replies
  • 1921 views

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.

Best answer by Semer CHERNI

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.

2 replies

Semer CHERNI
Semer CHERNIBest answer
ST Employee
June 3, 2024

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.

Explorer II
July 9, 2025

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.

Pavel A.
Super User
July 10, 2025

@alt Before C23 syntax 0b.... is a GNU extension. So compile with -std=gnu*** .

Explorer II
July 12, 2025

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.