Annex C (informative) Compatibility [diff] (original) (raw)

C.8 C standard library [diff.library]

C.8.1 General [diff.library.general]

Subclause [diff.library] summarizes the explicit changes in headers, definitions, declarations, or behavior between the C standard library in the C standard and the parts of the C++ standard library that were included from the C standard library.

C.8.3 Modifications to definitions [diff.mods.to.definitions]

C.8.3.1 Types char16_t and char32_t [diff.char16]

The types char16_t and char32_tare distinct types rather than typedefs to existing integral types.

The tokens char16_t and char32_tare keywords in C++ ([lex.key]).

They do not appear as macro or type names defined in.

C.8.3.2 Type wchar_t [diff.wchar.t]

The type wchar_t is a distinct type rather than a typedef to an existing integral type.

The token wchar_tis a keyword in C++ ([lex.key]).

It does not appear as a macro or type name defined in any of,, or .

C.8.3.7 Macro NULL [diff.null]

The macroNULL, defined in any of,,,,,, or , is an implementation-defined null pointer constant in C++ ([support.types]).

C.8.4 Modifications to declarations [diff.mods.to.declarations]

Header : The following functions have different declarations:

Header : The following functions have different declarations:

Header declares the names nullptr_t, byte, and to_integer, and the operators and operator templates in ([support.types.byteops]), in addition to the names declared in in the C standard library.

C.8.5 Modifications to behavior [diff.mods.to.behavior]

C.8.5.1 General [diff.mods.to.behavior.general]

Header : The following functions have different behavior:

Header : The following functions have different behavior:

C.8.5.2 Macro offsetof(type, member-designator) [diff.offsetof]

The macro offsetof, defined in, accepts a restricted set of type arguments in C++.

C.8.5.3 Memory allocation functions [diff.malloc]

The functionsaligned_alloc,calloc,malloc, andreallocare restricted in C++.

Subclause [c.malloc] describes the changes.