From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17733 invoked by alias); 24 Sep 2011 14:40:46 -0000 Received: (qmail 17718 invoked by uid 22791); 24 Sep 2011 14:40:44 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-ww0-f51.google.com (HELO mail-ww0-f51.google.com) (74.125.82.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 24 Sep 2011 14:40:30 +0000 Received: by wwf10 with SMTP id 10so4161456wwf.8 for ; Sat, 24 Sep 2011 07:40:29 -0700 (PDT) Received: by 10.227.2.129 with SMTP id 1mr5082970wbj.39.1316875229050; Sat, 24 Sep 2011 07:40:29 -0700 (PDT) Received: from [192.168.1.66] (93-97-63-88.zone5.bethere.co.uk. [93.97.63.88]) by mx.google.com with ESMTPS id p2sm21468730wbo.17.2011.09.24.07.40.27 (version=SSLv3 cipher=OTHER); Sat, 24 Sep 2011 07:40:27 -0700 (PDT) Message-ID: <4E7DEBD9.7060700@jguk.org> Date: Sat, 24 Sep 2011 14:40:00 -0000 From: Jon Grant User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.21) Gecko/20110831 Thunderbird/3.1.13 MIME-Version: 1.0 To: Jonathan Wakely CC: gcc@gcc.gnu.org Subject: Re: cc1.exe: warnings being treated as errors References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2011-09/txt/msg00273.txt.bz2 Jonathan Wakely wrote, On 19/09/11 19:40: > On 19 September 2011 18:59, Jon Grant wrote: >> Hello >> >> I noticed that when compiling C files with GCC and using the -Werror >> option, I see this additional output: >> >> cc1.exe: warnings being treated as errors >> ./src/main.c: In function 'main': >> ./src/main.c:41:15: error: unused variable 'hello' >> >> Is the "cc1" line output needed? Just wondering if it could be >> removed. Appears superfluous. > > It's not superfluous, it says that the error following might have been > a warning, except that -Werror was used. > > If you don't want it you can either fix the warning or not use -Werror. It's kind of re-iterating the command line options, that the user will choose to be aware of already. I don't recall seeing that text output before about ~1 year ago. I'd thought because the previous line of output said "gcc -Werror -Wall -o main main.c", the options clear. If it's really vauluble, that output could be turned on by an option itself! -Wdisplay-warning-upgrade. Leaving it off by default. Best regards, Jon