aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorDodji Seketeli <dodji@redhat.com>2011-10-17 14:01:37 +0000
committerDodji Seketeli <dodji@gcc.gnu.org>2011-10-17 16:01:37 +0200
commit411f92de7a3e15a42d3d640e5f7a0bc4cfc3e049 (patch)
tree9d64ab2d0d74e668a1a1205461e4e67274f131fd /libcpp
parent7d5a0f1b4e54f83337d5a0b093b0a40ae8cf27d6 (diff)
downloadgcc-411f92de7a3e15a42d3d640e5f7a0bc4cfc3e049.zip
gcc-411f92de7a3e15a42d3d640e5f7a0bc4cfc3e049.tar.gz
gcc-411f92de7a3e15a42d3d640e5f7a0bc4cfc3e049.tar.bz2
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. From-SVN: r180090
Diffstat (limited to 'libcpp')
-rw-r--r--libcpp/ChangeLog6
-rw-r--r--libcpp/line-map.c10
2 files changed, 10 insertions, 6 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog
index 3750720..c81c967 100644
--- a/libcpp/ChangeLog
+++ b/libcpp/ChangeLog
@@ -1,3 +1,9 @@
+2011-10-17 Dodji Seketeli <dodji@redhat.com>
+
+ * 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.
+
2011-10-15 Tom Tromey <tromey@redhat.com>
Dodji Seketeli <dodji@redhat.com>
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);
}