]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/doc/gcc/c-implementation-defined-behavior/characters.rst
sphinx: add missing trailing newline
[thirdparty/gcc.git] / gcc / doc / gcc / c-implementation-defined-behavior / characters.rst
1 ..
2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
5
6 .. _characters-implementation:
7
8 Characters
9 **********
10
11 * The number of bits in a byte (C90 3.4, C99 and C11 3.6).
12
13 Determined by ABI.
14
15 * The values of the members of the execution character set (C90,
16 C99 and C11 5.2.1).
17
18 Determined by ABI.
19
20 * The unique value of the member of the execution character set produced
21 for each of the standard alphabetic escape sequences (C90, C99 and C11
22 5.2.2).
23
24 Determined by ABI.
25
26 * The value of a ``char`` object into which has been stored any
27 character other than a member of the basic execution character set
28 (C90 6.1.2.5, C99 and C11 6.2.5).
29
30 Determined by ABI.
31
32 * Which of ``signed char`` or ``unsigned char`` has the same
33 range, representation, and behavior as 'plain' ``char`` (C90
34 6.1.2.5, C90 6.2.1.1, C99 and C11 6.2.5, C99 and C11 6.3.1.1).
35
36 .. index:: fsigned-char, funsigned-char
37
38 Determined by ABI. The options :option:`-funsigned-char` and
39 :option:`-fsigned-char` change the default. See :ref:`c-dialect-options`.
40
41 * The mapping of members of the source character set (in character
42 constants and string literals) to members of the execution character
43 set (C90 6.1.3.4, C99 and C11 6.4.4.4, C90, C99 and C11 5.1.1.2).
44
45 Determined by ABI.
46
47 * The value of an integer character constant containing more than one
48 character or containing a character or escape sequence that does not map
49 to a single-byte execution character (C90 6.1.3.4, C99 and C11 6.4.4.4).
50
51 See :ref:`cpp:implementation-defined-behavior`.
52
53 * The value of a wide character constant containing more than one
54 multibyte character or a single multibyte character that maps to
55 multiple members of the extended execution character set, or
56 containing a multibyte character or escape sequence not represented in
57 the extended execution character set (C90 6.1.3.4, C99 and C11
58 6.4.4.4).
59
60 See :ref:`cpp:implementation-defined-behavior`.
61
62 * The current locale used to convert a wide character constant consisting
63 of a single multibyte character that maps to a member of the extended
64 execution character set into a corresponding wide character code (C90
65 6.1.3.4, C99 and C11 6.4.4.4).
66
67 See :ref:`cpp:implementation-defined-behavior`.
68
69 * Whether differently-prefixed wide string literal tokens can be
70 concatenated and, if so, the treatment of the resulting multibyte
71 character sequence (C11 6.4.5).
72
73 Such tokens may not be concatenated.
74
75 * The current locale used to convert a wide string literal into
76 corresponding wide character codes (C90 6.1.4, C99 and C11 6.4.5).
77
78 See :ref:`cpp:implementation-defined-behavior`.
79
80 * The value of a string literal containing a multibyte character or escape
81 sequence not represented in the execution character set (C90 6.1.4,
82 C99 and C11 6.4.5).
83
84 See :ref:`cpp:implementation-defined-behavior`.
85
86 * The encoding of any of ``wchar_t``, ``char16_t``, and
87 ``char32_t`` where the corresponding standard encoding macro
88 (``__STDC_ISO_10646__``, ``__STDC_UTF_16__``, or
89 ``__STDC_UTF_32__``) is not defined (C11 6.10.8.2).
90
91 See :ref:`cpp:implementation-defined-behavior`. ``char16_t`` and
92 ``char32_t`` literals are always encoded in UTF-16 and UTF-32
93 respectively.