From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17621 invoked by alias); 4 Jan 2013 10:42:38 -0000 Received: (qmail 17613 invoked by uid 22791); 4 Jan 2013 10:42:37 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 04 Jan 2013 10:42:28 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r04AgSD9024003 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 4 Jan 2013 05:42:28 -0500 Received: from zalov.redhat.com (vpn1-5-3.ams2.redhat.com [10.36.5.3]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r04AgQW0008758 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 4 Jan 2013 05:42:27 -0500 Received: from zalov.cz (localhost [127.0.0.1]) by zalov.redhat.com (8.14.5/8.14.5) with ESMTP id r04AgPal022347; Fri, 4 Jan 2013 11:42:26 +0100 Received: (from jakub@localhost) by zalov.cz (8.14.5/8.14.5/Submit) id r04AgPVj022346; Fri, 4 Jan 2013 11:42:25 +0100 Date: Fri, 04 Jan 2013 10:42:00 -0000 From: Jakub Jelinek To: Marek Polacek Cc: GCC Patches Subject: Re: [PATCH] Clarify error message (PR middle-end/55859) Message-ID: <20130104104224.GK7269@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <20130104015946.GA6721@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130104015946.GA6721@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2013-01/txt/msg00172.txt.bz2 On Fri, Jan 04, 2013 at 02:59:46AM +0100, Marek Polacek wrote: > This patch clarifies the error message when using e.g. -Obar option, > except non-negative numbers we accept some other levels too. > Bootstrapped on x86_64-linux. Ok for trunk? > > 2013-01-04 Marek Polacek > > PR middle-end/55859 > * opts.c (default_options_optimization): Clarify error message. > > --- gcc/opts.c.mp 2013-01-04 02:48:33.116785922 +0100 > +++ gcc/opts.c 2013-01-04 02:48:51.729870314 +0100 > @@ -1,7 +1,6 @@ > /* Command line option handling. > Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, > - 2012 > - > + 2012, 2013 > Free Software Foundation, Inc. > Contributed by Neil Booth. > > @@ -543,7 +542,8 @@ default_options_optimization (struct gcc > const int optimize_val = integral_argument (opt->arg); > if (optimize_val == -1) > error_at (loc, > - "argument to %qs should be a non-negative integer", > + "argument to %qs should be a non-negative integer, " > + "'g', 's', or 'fast'", > "-O"); I wonder what is the point of using %qs with a fixed string, and ' should be probably replaced by %< and %>, so perhaps "argument to %<-O%> should be a non-negative integer, " "%, % or %"); Jakub