Insidious C Behavior
blog.adamdklein.com
blog.adamdklein.com
Some background on the signedness problem: http://yarchive.net/comp/ansic_broken_unsigned.html
alistra@bialobrewy ~ % clang -Weverything 1.c
1.c:6:8: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
if(-1 < x)
~~ ^ ~ alistra@bialobrewy ~ % gcc -Wextra 1.c
1.c: In function ‘main’:
1.c:6:8: warning: comparison between signed and unsigned integer expressions
alistra@bialobrewy ~ % gcc -Wall 1.c
alistra@bialobrewy ~ % "Testing something" ": more";
"Testing something"
": more";
This is still only considered one string, whether there are newlines in between or not. The translation unit is from the last semicolon to the next semicolon (overly simplified), so the compiler see this: "Testing something"": more";
Now it sees that there is no operator between the two "strings" and simply makes them a single string.