From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6545 invoked by alias); 10 Feb 2015 22:11:50 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 6511 invoked by uid 89); 10 Feb 2015 22:11:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wg0-f52.google.com Received: from mail-wg0-f52.google.com (HELO mail-wg0-f52.google.com) (74.125.82.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 10 Feb 2015 22:11:48 +0000 Received: by mail-wg0-f52.google.com with SMTP id z12so14894636wgg.11 for ; Tue, 10 Feb 2015 14:11:45 -0800 (PST) X-Received: by 10.180.149.242 with SMTP id ud18mr14143764wib.94.1423606305286; Tue, 10 Feb 2015 14:11:45 -0800 (PST) Received: from [192.168.1.95] (host-2-102-217-78.as13285.net. [2.102.217.78]) by mx.google.com with ESMTPSA id pp10sm22550877wjc.31.2015.02.10.14.11.43 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Feb 2015 14:11:44 -0800 (PST) Message-ID: <54DA821E.4070608@gmail.com> Date: Tue, 10 Feb 2015 22:11:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Pedro Alves , gdb-patches@sourceware.org Subject: Re: [PATCH 02/36] Add --enable-build-with-cxx configure switch References: <1423524046-20605-1-git-send-email-palves@redhat.com> <1423524046-20605-3-git-send-email-palves@redhat.com> In-Reply-To: <1423524046-20605-3-git-send-email-palves@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-02/txt/msg00278.txt.bz2 On 02/09/2015 11:20 PM, Pedro Alves wrote: > so that the compiler carries on compiling the file. -Werror still > catches the warnings, so nothing is lost, only our lifes are made > easier by concentrating on getting other other more important things > out of the way first. Yes, I agree on this. > @@ -172,11 +186,17 @@ then > for w in ${build_warnings}; do > case $w in > -Werr*) WERROR_CFLAGS=-Werror ;; > - *) # Check that GCC accepts it > + *) > + # Check whether GCC accepts it. Append -Werror to CFLAGS s/CFLAGS/CXXFLAGS/ ? Since you want to catch cc1plus warnings, so option should be append CXXFLAGS. > + # so that configure can catch warnings like: > + # cc1plus: warning: command line option '-Wpointer-sign' is valid for C/ObjC but not for C++ [enabled by default] > saved_CFLAGS="$CFLAGS" > - CFLAGS="$CFLAGS $w" > + CFLAGS="$CFLAGS -Werror $w" > + saved_CXXFLAGS="$CXXFLAGS" > + CXXFLAGS="$CXXFLAGS -Werror $w" > AC_TRY_COMPILE([],[],WARN_CFLAGS="${WARN_CFLAGS} $w",) > CFLAGS="$saved_CFLAGS" > + CXXFLAGS="$saved_CXXFLAGS" > esac > done > AC_MSG_RESULT(${WARN_CFLAGS} ${WERROR_CFLAGS}) -- Yao