Synopsis: | Since conversion between signed and unsigned integral types involves implementation defined behaviour, signed and unsigned data items shall not be mixed within the same expression. |
Language: | C |
Severity Level: | 1 |
Category: | CONVERSIONS |
Description: |
Although nearly all implementations will behave the same when converting to signed types, maximum portability requires that all implementation defined behaviour is avoided. See also the discussion in section 1.8. Example: int a; unsigned int c; a = c; /* WRONG */ |