- 论坛徽章:
- 0
|
5可用积分
为了完整,列出了c99标准的两段。
“It is unspecified whether these arrays are distinct provided their elements have the
appropriate values. ”
这句话何解?请赐教
5 In translation phase 7, a byte or code of value zero is appended to each multibyte
character sequence that results from a string literal or literals.65) The multibyte character
sequence is then used to initialize an array of static storage duration and length just
sufficient to contain the sequence. For character string literals, the array elements have
type char, and are initialized with the individual bytes of the multibyte character
sequence; for wide string literals, the array elements have type wchar_t, and are
initialized with the sequence of wide characters corresponding to the multibyte character
6 It is unspecified whether these arrays are distinct provided their elements have the
appropriate values. If the program attempts to modify such an array, the behavior is
undefined. |
最佳答案
查看完整内容
对的,编译器是否对值相等的字符串字面值实现存储优化拥有自主权
|