1 2 3 4 5 6 7 | void foo(){} int main() { if (1, true) {/*...*/} if(1, foo()) {/*...*/} } |
dm9pZCBmb28oKXt9CgoKaW50IG1haW4oKSB7CmlmICgxLCB0cnVlKSB7LyouLi4qL30KaWYoMSwgZm9vKCkpIHsvKi4uLiovfQp9
prog.cpp: In function ‘int main()’: prog.cpp:5: warning: left-hand operand of comma has no effect prog.cpp:6: warning: left-hand operand of comma has no effect prog.cpp:6: error: could not convert ‘(0, foo())’ to ‘bool’
-
result: Compilation error (maybe you wish to see an example for C++ 4.7.2)


