From Newsgroup: comp.lang.c
Keith Thompson <
Keith.S.Thompson+u@gmail.com> writes:
Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
[...]
You made a statement, "gcc disagrees with you". I demonstrated,
in text that you snipped, that gcc does in fact agree with me.
No, you didn't.
Yes, I did.
You were wrong.
No, I wasn't. Your testing was faulty.
Yes, you were. My testing was not faulty.
Oddly enough, your response reminds me of an observation
reportedly attributed to Leonaro da Vinci.
~ $ cd demo
~/demo $ /bin/ls
ce.c
~/demo $ cat ce.c
#include <limits.h>
int
main(){
switch(1){
case (INT_MAX+1)*0: return 1;
default: return 0;
}
}
~/demo $ gcc -std=c99 -pedantic-errors -Wno-overflow -o gcc-ce ce.c
~/demo $ clang -std=c99 -pedantic-errors -Wno-integer-overflow -o clang-ce ce.c ~/demo $ /bin/ls
ce.c clang-ce gcc-ce
~/demo $ ./gcc-ce
~/demo $ echo $?
0
~/demo $ ./clang-ce
~/demo $ echo $?
0
~/demo $
--- Synchronet 3.22a-Linux NewsLink 1.2