From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29421 invoked by alias); 18 Oct 2011 17:39:09 -0000 Received: (qmail 29271 invoked by uid 22791); 18 Oct 2011 17:39:07 -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; Tue, 18 Oct 2011 17:38:53 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p9IHcr8D011301 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 18 Oct 2011 13:38:53 -0400 Received: from localhost (ovpn-113-165.phx2.redhat.com [10.3.113.165]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p9IHcpSH002137 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 18 Oct 2011 13:38:52 -0400 Received: by localhost (Postfix, from userid 500) id 1A055DBF6; Tue, 18 Oct 2011 19:38:51 +0200 (CEST) From: Dodji Seketeli To: David Edelsohn Cc: GCC Patches Subject: Re: [PATCH 3/6] Emit macro expansion related diagnostics References: X-URL: http://www.redhat.com Date: Tue, 18 Oct 2011 18:16:00 -0000 In-Reply-To: (Dodji Seketeli's message of "Tue, 18 Oct 2011 18:09:44 +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/msg01673.txt.bz2 Dodji Seketeli writes: > David Edelsohn writes: > >> Your patch broke bootstrap on AIX because of the typedef "loc_t" >> introduced in tree-diagnostics.c. I have committed the patch below. Tested on x86_64-unknown-linux-gnu only, unfortunately. I hope it fixes the build on AIX. From: Dodji Seketeli Date: Tue, 18 Oct 2011 18:40:06 +0200 Subject: [PATCH] Do not use loc_t as a type name gcc/ * tree-diagnostic (struct loc_t): Rename into struct loc_map_pair. (maybe_unwind_expanded_macro_loc): Adjust. --- gcc/tree-diagnostic.c | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gcc/tree-diagnostic.c b/gcc/tree-diagnostic.c index 53b350b..b4b60dc 100644 --- a/gcc/tree-diagnostic.c +++ b/gcc/tree-diagnostic.c @@ -56,10 +56,10 @@ typedef struct { const struct line_map *map; source_location where; -} loc_t; +} loc_map_pair; -DEF_VEC_O (loc_t); -DEF_VEC_ALLOC_O (loc_t, heap); +DEF_VEC_O (loc_map_pair); +DEF_VEC_ALLOC_O (loc_map_pair, heap); /* Unwind the different macro expansions that lead to the token which location is WHERE and emit diagnostics showing the resulting @@ -111,9 +111,9 @@ maybe_unwind_expanded_macro_loc (diagnostic_context *context, const struct line_map **first_exp_point_map) { const struct line_map *map; - VEC(loc_t,heap) *loc_vec = NULL; + VEC(loc_map_pair,heap) *loc_vec = NULL; unsigned ix; - loc_t loc, *iter; + loc_map_pair loc, *iter; map = linemap_lookup (line_table, where); if (!linemap_macro_expansion_map_p (map)) @@ -132,7 +132,7 @@ maybe_unwind_expanded_macro_loc (diagnostic_context *context, loc.where = where; loc.map = map; - VEC_safe_push (loc_t, heap, loc_vec, &loc); + VEC_safe_push (loc_map_pair, heap, loc_vec, &loc); /* WHERE is the location of a token inside the expansion of a macro. MAP is the map holding the locations of that macro @@ -150,7 +150,7 @@ maybe_unwind_expanded_macro_loc (diagnostic_context *context, first macro which expansion triggered this trace was expanded inside a system header. */ if (!LINEMAP_SYSP (map)) - FOR_EACH_VEC_ELT (loc_t, loc_vec, ix, iter) + FOR_EACH_VEC_ELT (loc_map_pair, loc_vec, ix, iter) { source_location resolved_def_loc = 0, resolved_exp_loc = 0; diagnostic_t saved_kind; @@ -203,7 +203,7 @@ maybe_unwind_expanded_macro_loc (diagnostic_context *context, context->printer->prefix = saved_prefix; } - VEC_free (loc_t, heap, loc_vec); + VEC_free (loc_map_pair, heap, loc_vec); } /* This is a diagnostic finalizer implementation that is aware of -- 1.7.6.2 -- Dodji