public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Dodji Seketeli <dodji@redhat.com>
To: Richard Guenther <richard.guenther@gmail.com>
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
Date: Mon, 17 Oct 2011 14:11:00 -0000	[thread overview]
Message-ID: <m3ehybwxa1.fsf@redhat.com> (raw)
In-Reply-To: <m3ty77x2ex.fsf@redhat.com> (Dodji Seketeli's message of "Mon, 17	Oct 2011 13:50:30 +0200")

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 <dodji@redhat.com>
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

  reply	other threads:[~2011-10-17 13:42 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-17  9:58 [PATCH 0/6] Tracking locations of tokens resulting from macro expansion Dodji Seketeli
2011-10-17  9:58 ` [PATCH 3/6] Emit macro expansion related diagnostics Dodji Seketeli
2011-10-17 10:56   ` Richard Guenther
2011-10-17 12:22     ` Dodji Seketeli
2011-10-17 14:11       ` Dodji Seketeli [this message]
2011-10-17 17:41         ` H.J. Lu
2011-10-18  0:29           ` Dodji Seketeli
2011-10-18  6:07             ` Jason Merrill
2011-10-18  9:22               ` Dodji Seketeli
2011-10-17 10:08 ` [PATCH 4/6] Support -fdebug-cpp option Dodji Seketeli
2011-10-17 10:19 ` [PATCH 6/6] Reduce memory waste due to non-power-of-2 allocs Dodji Seketeli
2011-10-17 10:22 ` [PATCH 5/6] Add line map statistics to -fmem-report output Dodji Seketeli
2011-10-17 10:25 ` [PATCH 1/6] Linemap infrastructure for virtual locations Dodji Seketeli
2011-10-17 19:53   ` Gerald Pfeifer
2011-10-17 20:44     ` Dodji Seketeli
2011-10-18  7:24       ` Gerald Pfeifer
2011-10-18  9:44         ` Dodji Seketeli
2011-10-17 10:26 ` [PATCH 2/6] Generate virtual locations for tokens Dodji Seketeli
2011-10-19 14:48   ` Ulrich Weigand
2011-10-19 17:11     ` Dodji Seketeli
2011-10-19 20:42     ` Dodji Seketeli
  -- strict thread matches above, loose matches on Subject: below --
2011-10-18 15:25 [PATCH 3/6] Emit macro expansion related diagnostics David Edelsohn
2011-10-18 15:30 ` Joseph S. Myers
2011-10-18 15:37   ` Gabriel Dos Reis
2011-10-18 15:34 ` Jakub Jelinek
2011-10-18 16:56 ` Dodji Seketeli
2011-10-18 18:16   ` Dodji Seketeli
2010-12-10 11:27 [PATCH 0/6] Tracking locations of tokens resulting from macro expansion Dodji Seketeli
2010-12-10 11:27 ` [PATCH 3/6] Emit macro expansion related diagnostics Dodji Seketeli
2010-12-13 15:25   ` Paolo Bonzini
2010-12-13 15:38     ` Paolo Bonzini
2010-12-13 16:30     ` Manuel López-Ibáñez
2010-12-14  7:24     ` Dodji Seketeli
2010-12-14  7:28       ` Gabriel Dos Reis
2010-12-14  8:40         ` Dodji Seketeli
2010-12-14  9:38           ` Gabriel Dos Reis
2010-12-14  9:42             ` Dodji Seketeli
2010-12-14  9:48               ` Gabriel Dos Reis
2010-12-14  7:28     ` Dodji Seketeli
2010-12-14  8:19       ` Gabriel Dos Reis
2010-12-14  8:31         ` Paolo Bonzini
2010-12-14  9:23           ` Dodji Seketeli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3ehybwxa1.fsf@redhat.com \
    --to=dodji@redhat.com \
    --cc=burnus@net-b.de \
    --cc=charlet@act-europe.fr \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gdr@integrable-solutions.net \
    --cc=jason@redhat.com \
    --cc=joseph@codesourcery.com \
    --cc=richard.guenther@gmail.com \
    --cc=tromey@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).