From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6027 invoked by alias); 16 Feb 2011 20:09:37 -0000 Received: (qmail 5883 invoked by uid 22791); 16 Feb 2011 20:09:30 -0000 X-SWARE-Spam-Status: No, hits=3.3 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RFC_ABUSE_POST,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from snt0-omc4-s4.snt0.hotmail.com (HELO snt0-omc4-s4.snt0.hotmail.com) (65.55.90.207) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 16 Feb 2011 20:09:26 +0000 Received: from SNT106-W3 ([65.55.90.200]) by snt0-omc4-s4.snt0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 16 Feb 2011 12:09:24 -0800 Message-ID: From: Jason Mancini To: Subject: infinite for-loop and related question Date: Wed, 16 Feb 2011 20:17:00 -0000 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/msg00241.txt.bz2 Hello, So as I recall, the following can be an infinite loop now with optimization= s, right? =A0 for (int i(1); i!=3D0; ++i) { ... } What about: =A0 unsigned int x =3D 0xFFFFFFFFU; =A0 x =3D x+1; =A0 if (x) { ... can we get here because "positive x + 1 must still positiv= e"? ... } If not, given the first, why not? Thanks, Jason Mancini=20=09=09=20=09=20=20=20=09=09=20=20