Any C compiler where “==” evaluates to larger than one?
问题 As anything non-zero means true, but the > , < , == etc. operators returning 1 for true, I'm curious if there are any notable C compilers where these operators can result in a value greater than 1 . In other words, is there any compiler where int i = (a==b) ; would result in undefined behavior if I intended to use i not as a boolean value, but as an integer, and was assuming it would be either 0 or 1 ? 回答1: No, if there are, they're not C compilers :-) The standard mandates that relational