prev up next   top/contents search

comp.lang.c FAQ list · Question 3.18

Q: What does the warning ``semantics of `>' change in ANSI C'' mean?


A: This message represents an attempt by certain (perhaps overzealous) compilers to warn you that some code may perform differently under the ANSI C ``value preserving'' rules than under the older ``unsigned preserving'' rules.

The wording of this message is rather confusing because what has changed is not really the semantics of the > operator itself (in fact, almost any C operator can appear in the message), but rather the semantics of the implicit conversions which always occur when two dissimilar types meet across a binary operator, or when a narrow integral type must be promoted.

(If you didn't think you were using any unsigned values in your expression, the most likely culprit is strlen. In Standard C, strlen returns size_t, which is an unsigned type.)

See question 3.19.


prev up next   contents search
about this FAQ list   about eskimo   search   feedback   copyright

Hosted by Eskimo North