Go to main content
Oracle® Developer Studio 12.6: C User's Guide

Exit Print View

Updated: July 2017
 
 

9.2 C 11 Supported Features

  • _Alignas specifier

  • _Alignof operator

  • _Atomic qualifier

  • _Atomic type specifier

  • _Noreturn

  • _Static_assert

  • _Thread_local storage specifier

  • Allow typedef redefinition

  • anonymous structs/unions

  • Generic selection

  • Unicode characters and strings

  • Updated set of UCN characters allowed

  • __STDC_ANALYZABLE__ macro

  • __STDC_NO_THREADS__ macro

C.2.1 _Alignas specifier

Feature: 6.7.5 Alignment specifier

_Alignas ( type-name )
_Alignas ( constant-expression )
  

The _Alignas specifier cannot be used in a declaration of a typedef, a bit-field, a function, a parameter, or an object declared with the register storage-class specifier.

The constant expression shall evaluate to an integer constant expression The constant expression must evaluate to an integer constant expression that is a power of 2 between 1 and 128. Valid values are: 0, 1,2, 4, 8, 16, 32, 64, and 128. The value must evaluate to an alignment that is the same or stricter than the alignment that would be required for the type of the object or member being declared.

_Alignas ( type-name) is equivalent of _Alignas (_Alignof (type-name)).

An alignment specifier of 0 has no effect.

The effective alignment is that of the strictest alignment specifier.

An object declared with an alignment specifier must be specified with the same alignment specifier, or no alignment specifier, on every other declaration of that object. The alignment of an object must be specified the same in every source file declaring the same object, or behavior is undefined.

C.2.2 _Alignof operator

Feature: 6.5.3.4 _Alignof operators

_Alignof ( type-name )

The _Alignof operator evaluates to an integer constant representing the alignment requirement of its operand type. The operand is not evaluated. The _Alignof operator cannot be used on a function or incomplete type.

C.2.3 Atomics

Feature: 6.7.2.4 Atomic type specifiers

Feature: 6.7.3 _Atomic qualifier

Feature: 6.5.2.4 Atomic operators

Feature: 6.5.3.1 Atomic operators

Feature: 6.5.16.2 Atomic operators

Feature: 7.17 Atomics

Atomics might require linking with an Atomics runtime support library, See -xatomic=a.

C.2.4 _Noreturn

Feature: 6.7.4 Function Specifiers, _Noreturn

Place the _Noreturn specifier in the declaration of a function that never returns, for example:

_Noreturn void leave () {
    abort();
  }

C.2.5 _Static_assert

Feature: 6.7.10 Static assertions

_Static_assert ( constant-expression , string-literal ) ;

C.2.6 Universal Character Names (UCN)

Update the set of characters allowed in UCNs as per Annex D of ISO/IEC 9899:2011. Refer to ISO/IEC 9899:2011 Annex D for the full list of characters allowed.