From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29209 invoked by alias); 16 Sep 2011 09:47:40 -0000 Received: (qmail 29198 invoked by uid 22791); 16 Sep 2011 09:47:39 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-pz0-f49.google.com (HELO mail-pz0-f49.google.com) (209.85.210.49) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 16 Sep 2011 09:47:20 +0000 Received: by pzk34 with SMTP id 34so1228883pzk.8 for ; Fri, 16 Sep 2011 02:47:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.68.8.166 with SMTP id s6mr1418754pba.398.1316166439069; Fri, 16 Sep 2011 02:47:19 -0700 (PDT) Received: by 10.142.57.6 with HTTP; Fri, 16 Sep 2011 02:47:19 -0700 (PDT) In-Reply-To: References: Date: Fri, 16 Sep 2011 09:47:00 -0000 Message-ID: Subject: Re: compile with gcc option -O0 or -O From: Jonathan Wakely To: zou wonder Cc: gcc-help@gcc.gnu.org, david@westcontrol.com Content-Type: text/plain; charset=ISO-8859-1 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: 2011-09/txt/msg00137.txt.bz2 On 16 September 2011 10:12, zou wonder wrote: > hi david: > i have tried to enable all the warning option you provided : > and here are some warnings: As Miles said, many of the warning options David suggested are not suitable for all code, you will get most of the benefit just using -Wall -Wextra