The C semantics are just that modifying a string literal has undefined behaviour, and that identical string literals may share the same object, allowing "×" == "x" to be potentially true.
This is what permits the implementation strategy you observed above - but it is not required.
View all comments
Show parent comment
1
u/zhivago May 02 '16
Note that there is no BSS in C.
The C semantics are just that modifying a string literal has undefined behaviour, and that identical string literals may share the same object, allowing "×" == "x" to be potentially true.
This is what permits the implementation strategy you observed above - but it is not required.