From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16183 invoked by alias); 1 Dec 2008 12:44:37 -0000 Received: (qmail 16174 invoked by uid 22791); 1 Dec 2008 12:44:36 -0000 X-Spam-Check-By: sourceware.org Received: from exprod6ob117.obsmtp.com (HELO psmtp.com) (64.18.1.38) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 01 Dec 2008 12:43:56 +0000 Received: from source ([192.150.8.22]) by exprod6ob117.postini.com ([64.18.5.12]) with SMTP ID DSNKSTPcB3jBHSC2dPfCP1iSeOAiRBdChX4c@postini.com; Mon, 01 Dec 2008 04:43:56 PST Received: from inner-relay-3.eur.adobe.com (inner-relay-3b [10.128.4.236]) by outbound-smtp-2.corp.adobe.com (8.12.10/8.12.10) with ESMTP id mB1ChnE0001221; Mon, 1 Dec 2008 04:43:49 -0800 (PST) Received: from nacas01.corp.adobe.com (nacas01.corp.adobe.com [10.8.189.99]) by inner-relay-3.eur.adobe.com (8.12.10/8.12.9) with ESMTP id mB1ChlEL003992; Mon, 1 Dec 2008 04:43:48 -0800 (PST) Received: from excas03.corp.adobe.com (10.8.189.123) by nacas01.corp.adobe.com (10.8.189.99) with Microsoft SMTP Server (TLS) id 8.1.291.4; Mon, 1 Dec 2008 04:43:47 -0800 Received: from nambx04.corp.adobe.com ([10.8.127.98]) by excas03.corp.adobe.com ([10.8.189.123]) with mapi; Mon, 1 Dec 2008 04:43:46 -0800 From: "John (Eljay) Love-Jensen" To: Andrzej Giniewicz CC: "gcc-help@gcc.gnu.org" Date: Mon, 01 Dec 2008 12:44:00 -0000 Subject: RE: Need some clarification about optimization flags, what "exactly" does -O1 do? Message-ID: <204DEA5423F3BF47A6EE88C4E2979EC66BB562B70E@nambx04.corp.adobe.com> References: <492E830A.3070607@redhat.com> <492E8774.4080507@redhat.com>, In-Reply-To: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-IsSubscribed: yes 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: 2008-12/txt/msg00002.txt.bz2 Hi Andrzej Giniewicz, > interesting, seems like something similar, any hints how to start trackin= g real issue? Well, if that IS the real issue, I'd start looking for enum abuse. For example, in some old code I had to maintain, there was this situation (= simplified): enum Bar { uno, dos, tres }; int Foo(enum Bar bar) { int value =3D bar; switch(value) { case uno: return 100; case dos: return 200; case tres: return 300; case 4: return 400; case -1: return 0; default: return -1; } } The last three cases could happen in the code, due to sledgehammer casting.= That's undefined behavior. The int value =3D bar; did not fix the undefi= ned behavior. Ultimately, the code was fixed to not have undefined behavior. HTH, --Eljay