From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17605 invoked by alias); 16 Feb 2011 20:41:53 -0000 Received: (qmail 17597 invoked by uid 22791); 16 Feb 2011 20:41:52 -0000 X-SWARE-Spam-Status: No, hits=0.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RFC_ABUSE_POST,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from snt0-omc3-s22.snt0.hotmail.com (HELO snt0-omc3-s22.snt0.hotmail.com) (65.55.90.161) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 16 Feb 2011 20:41:48 +0000 Received: from SNT106-W38 ([65.55.90.137]) by snt0-omc3-s22.snt0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 16 Feb 2011 12:41:46 -0800 Message-ID: From: Jason Mancini To: CC: Subject: RE: infinite for-loop and related question Date: Wed, 16 Feb 2011 21:37:00 -0000 In-Reply-To: References: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2011-02/txt/msg00243.txt.bz2 > No. The C and C++ standards define that unsigned integers do not > overflow, they wrap, with well-defined behaviour. Aha, thank=A0 you! Though I still find the output of this odd: =A0 for (char i(1); i>0; ++i)=20 =A0=A0=A0 printf("%d %d\n", i, sizeof(i)); ... 362195 1 362196 1 362197 1 ... For very large values of char!=A0 ^_^ Jason =20=09=09=20=09=20=20=20=09=09=20=20