Should GCC publish a general rule/warning due to it's default presumption of undefined signed integer overflow semantics?

Gabriel Dos Reis gdr@integrable-solutions.net
Sun Jul 3 00:16:00 GMT 2005


Robert Dewar <dewar@adacore.com> writes:

| Gabriel Dos Reis wrote:
| >    for (int i = min; i < max; ++i)
| >        ....
| > and i, min and max don't change in the body, no matter what you think
| > of C's general "for" not being a FOR loop, the above is a FOR loop.
| 
| But this normal paradigm for representing a FOR loop does not work for
| all possible ranges,

Yes, but it needs not cover all possible ranges.  For practical
purposes, if it covers the vast majority of such loops I'll take it
and leave you complaining about not covering all possible ranges.

-- Gaby



More information about the Gcc mailing list