From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9999 invoked by alias); 9 May 2016 09:23:40 -0000 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 Received: (qmail 9984 invoked by uid 89); 9 May 2016 09:23:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.0 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=overly, Hx-languages-length:1280 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 09 May 2016 09:23:38 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9A7BE4620B; Mon, 9 May 2016 09:23:37 +0000 (UTC) Received: from localhost.localdomain (vpn1-4-64.ams2.redhat.com [10.36.4.64]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u499NZHY012163; Mon, 9 May 2016 05:23:36 -0400 Subject: Re: Error out on -fvtable-verify without --enable-vtable-verify To: Rainer Orth , gcc-patches@gcc.gnu.org References: From: Bernd Schmidt Message-ID: <57305717.5090508@redhat.com> Date: Mon, 09 May 2016 09:23:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-05/txt/msg00581.txt.bz2 On 05/08/2016 12:44 PM, Rainer Orth wrote: > With the recent change not to install libvtv without > --enable-vtable-verify, I noticed that gcc/g++ would still accept > -fvtable-verify without errors, only to emit obscure link-time errors > about missing vtv_*.o (which hadn't been installed in that situation > before) and libvtv. > > It seems to me a much better user experience to emit a clear error > message in this case, which is what this patch does. Generally ok, but... > +AC_ARG_ENABLE(vtable-verify, > +[AS_HELP_STRING([--enable-vtable-verify], > + [enable vtable verification feature])], > +[case "$enableval" in > + yes) enable_vtable_verify=yes ;; > + no) enable_vtable_verify=no ;; > + *) enable_vtable_verify=no;; > + esac], > +[enable_vtable_verify=no]) > +vtable_verify=`if test $enable_vtable_verify != no; then echo 1; else echo 0; fi` > +AC_DEFINE_UNQUOTED(ENABLE_VTABLE_VERIFY, $vtable_verify, > +[Define 0/1 if vtable verification feature is enabled.]) That looks a little overly complicated. Don't you get the enable_ variables set by autoconf? And if you do need the case statement, you might as well set things to 0/1 directly and skip the enable_vtable_verify variable entirely. Bernd