C11 is the informal name of an older standard version (ISO/IEC 9899:2011) of the C programming language.
Important Note: All C related questions, shall be tagged as c, and then as a complement, each should specify the version of the standard it is using. In case of C11, this complement should be the c11 tag.
Detection
A standard macro __STDC_VERSION__
is defined with the value 201112L
to indicate that C11 support is available. See corr 1:2012.
Some of the changes since c99:
_Alignas
specifier (and optionally thealignas
macro)_Alignof
operator (and optionally thealignof
macro)_Noreturn
function specifier (and optionally thenoreturn
macro)_Generic
keyword_Static_assert
keyword (and optionally thestatic_assert
macro)_Thread_local
storage-class specifier (and optionally thethread_local
macro)_Atomic
type qualifier_Complex
and_Imaginary
keywords (and optionally thecomplex
andimaginary
macros)once_flag
,cnd_t
,mtx_t
,thrd_t
,thrd_start_t
,tss_t
andtss_dtor_t
typeschar16_t
andchar32_t
types- anonymous
struct
andunion
support aligned_alloc
functionquick_exit
functiongets_s
function in much-rejected optional Annex K (see tr24731) as an alternative to the removedgets
More Info:
- Wikipedia: C11 (C standard revision)
- C11 Standard (Committee Draft, Document N1570)
- Field Experience With Annex K - Bounds Checking Interfaces. Some insights about why Annex K was problematic to implement in practice.