From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5957 invoked by alias); 17 Oct 2011 13:42:15 -0000 Received: (qmail 5947 invoked by uid 22791); 17 Oct 2011 13:42:14 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,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; Mon, 17 Oct 2011 13:41:56 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p9HDfT6A019903 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 17 Oct 2011 09:41:29 -0400 Received: from localhost (ovpn-113-95.phx2.redhat.com [10.3.113.95]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p9HDfRnd031944 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 17 Oct 2011 09:41:29 -0400 Received: by localhost (Postfix, from userid 500) id C105329C129; Mon, 17 Oct 2011 15:41:26 +0200 (CEST) From: Dodji Seketeli To: Richard Guenther Cc: gcc-patches@gcc.gnu.org, jason@redhat.com, tromey@redhat.com, gdr@integrable-solutions.net, joseph@codesourcery.com, burnus@net-b.de, charlet@act-europe.fr Subject: Re: [PATCH 3/6] Emit macro expansion related diagnostics References: <1318845428-32182-1-git-send-email-dodji@redhat.com> <1318845428-32182-4-git-send-email-dodji@redhat.com> X-URL: http://www.redhat.com Date: Mon, 17 Oct 2011 14:11:00 -0000 In-Reply-To: (Dodji Seketeli's message of "Mon, 17 Oct 2011 13:50:30 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2011-10/txt/msg01527.txt.bz2 Finally here is what I am checking in, which passes bootstrap with --disable-checking --enable-languages=all,ada -- modulo this other bug that breaks bootstrap as well http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50709. It's been OKed off-line by Tom Tromey. commit c1cd2be336ceec75cf40ac5f32cc4f72b8fc5da3 Author: Dodji Seketeli Date: Mon Oct 17 13:33:41 2011 +0200 Fix bootstrapping with --disable-checking libcpp/ChangeLog * line-map.c (linemap_macro_map_loc_to_exp_point): Avoid setting a variable without using it if ENABLE_CHECKING is not defined. Mark the LOCATION parameter as being unused. diff --git a/libcpp/line-map.c b/libcpp/line-map.c index 87b8bfe..43e2856 100644 --- a/libcpp/line-map.c +++ b/libcpp/line-map.c @@ -621,18 +621,16 @@ linemap_macro_expansion_map_p (const struct line_map *map) Read the comments of struct line_map and struct line_map_macro in line-map.h to understand what a macro expansion point is. */ -source_location +static source_location linemap_macro_map_loc_to_exp_point (const struct line_map *map, - source_location location) + source_location location ATTRIBUTE_UNUSED) { - unsigned token_no; - linemap_assert (linemap_macro_expansion_map_p (map) && location >= MAP_START_LOCATION (map)); /* Make sure LOCATION is correct. */ - token_no = location - MAP_START_LOCATION (map); - linemap_assert (token_no < MACRO_MAP_NUM_MACRO_TOKENS (map)); + linemap_assert ((location - MAP_START_LOCATION (map)) + < MACRO_MAP_NUM_MACRO_TOKENS (map)); return MACRO_MAP_EXPANSION_POINT_LOCATION (map); } -- Dodji