Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

What is the __STDC_VERSION__ value for C23?

What is the STDC_VERSION value for C11? asks about C11, and How can I use "nullptr" for null pointers prior to C23? says that the current versions of GCC and Clang define it to a placeholder value 202000L.

GCC 14 Release Series Changes, New Features, and Fixes has now added the std=c23 flag, but doesn’t mention what __STDC_VERSION__ expands to.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

From N3220:

__STDC_VERSION__ The integer constant 202311L

popular name edition constant
C23 fifth 202311L
C17/18 fourth 201710L
C11 third 201112L
C99 second 199901L
C?? first, amendment 1 199409L

It was in the first edition, amendment 1, to C89/90 where the addition of the predefined __STDC_VERSION__ macro was made. I’m unsure if it goes by any popular name but C94/95 has been suggested.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading