Liste des Groupes | Revenir à cl c |
On Fri, 02 Aug 2024 19:40:32 -0700, Keith Thompson
<Keith.S.Thompson+u@gmail.com> wrote:Thiago Adams <thiago.adams@gmail.com> writes:(cough) UINT_MAX (cough)I think both cases (overflow and wraparound) should have warnings.
You're free to think that, of course, but wraparound behavior is well
defined and unambiguous. I wouldn't mind an *optional* warning, but
plenty of programmers might deliberately write something like
const unsigned int max = -1;
with the reasonable expectation that it will set max to INT_MAX.
Les messages affichés proviennent d'usenet.