This little snippet prints "true" if compiled with gcc and "not true" if
compiled with tcc.
int main (void){
printf ("%sok\n","a"=="a"?"":"not ");
return 0;
}
Note that "a"=="a" is not what it looks like. We are comparing the
address of the pointer "a" with itself. If the book I just looked at
(Banahan, et al., 1991) interprets the standard correctly, a quoted
string serves as a pointer to the first element, thus "a"=="a" should
return true.
Ref
Banahan, Mike, Brady, Declan and Doran, Mark. (1991). The C Book —
Character handling. Chapter 5.4. Retrieved November 8, 2010, from
http://publications.gbdirect.co.uk/c_book/chapter5/character_handling.html
_______________________________________________
Tinycc-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/tinycc-devel