summaryrefslogtreecommitdiff
path: root/libcpp/line-map.c
diff options
context:
space:
mode:
authorglisse <glisse@138bc75d-0d04-0410-961f-82ee72b054a4>2013-01-03 20:06:49 +0000
committerglisse <glisse@138bc75d-0d04-0410-961f-82ee72b054a4>2013-01-03 20:06:49 +0000
commitde2e6b8afe9a8f4e2d8640e8e08a3a1069e19774 (patch)
tree8333424ab8e4eaff4241a11934358310633c59e2 /libcpp/line-map.c
parentadc17cf799c99798265f17a04ddd457d9eb24bf5 (diff)
downloadgcc-de2e6b8afe9a8f4e2d8640e8e08a3a1069e19774.tar.gz
2013-01-03 Marc Glisse <marc.glisse@inria.fr>
PR bootstrap/50167 gcc/ * graphite-interchange.c (pdr_stride_in_loop): Use gmp_fprintf. * graphite-poly.c (debug_gmp_value): Likewise. PR bootstrap/50177 libcpp/ * line-map.c (get_combined_adhoc_loc): Cast from extern "C" type. (new_linemap): Likewise. (linemap_enter_macro): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194868 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp/line-map.c')
-rw-r--r--libcpp/line-map.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/libcpp/line-map.c b/libcpp/line-map.c
index 61ab0318c03..49b94871baa 100644
--- a/libcpp/line-map.c
+++ b/libcpp/line-map.c
@@ -122,8 +122,10 @@ get_combined_adhoc_loc (struct line_maps *set,
{
char *orig_data = (char *) set->location_adhoc_data_map.data;
long long offset;
- line_map_realloc reallocator
- = set->reallocator ? set->reallocator : xrealloc;
+ /* Cast away extern "C" from the type of xrealloc. */
+ line_map_realloc reallocator = (set->reallocator
+ ? set->reallocator
+ : (line_map_realloc) xrealloc);
if (set->location_adhoc_data_map.allocated == 0)
set->location_adhoc_data_map.allocated = 128;
@@ -217,8 +219,10 @@ new_linemap (struct line_maps *set,
/* We ran out of allocated line maps. Let's allocate more. */
unsigned alloc_size;
- line_map_realloc reallocator
- = set->reallocator ? set->reallocator : xrealloc;
+ /* Cast away extern "C" from the type of xrealloc. */
+ line_map_realloc reallocator = (set->reallocator
+ ? set->reallocator
+ : (line_map_realloc) xrealloc);
line_map_round_alloc_size_func round_alloc_size =
set->round_alloc_size;
@@ -430,8 +434,10 @@ linemap_enter_macro (struct line_maps *set, struct cpp_hashnode *macro_node,
{
struct line_map *map;
source_location start_location;
- line_map_realloc reallocator
- = set->reallocator ? set->reallocator : xrealloc;
+ /* Cast away extern "C" from the type of xrealloc. */
+ line_map_realloc reallocator = (set->reallocator
+ ? set->reallocator
+ : (line_map_realloc) xrealloc);
start_location = LINEMAPS_MACRO_LOWEST_LOCATION (set) - num_tokens;