Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
if-statement with two checks with different data types
#8
Yes, but see also C99 Section 6.3.8 paragraph 6 and Section 6.3.9 paragraph 3. These state that the results of relational and equality operators respectively have type int.

The type of the result is independent of the promotions and usual arithmetic conversions that may be performed on the operands of relational and equality operators.
Posted by and on behalf of the MISRA C Working Group
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)