aboutsummaryrefslogtreecommitdiff
path: root/libcpp/line-map.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcpp/line-map.c')
-rw-r--r--libcpp/line-map.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libcpp/line-map.c b/libcpp/line-map.c
index 7ba003a..476a465 100644
--- a/libcpp/line-map.c
+++ b/libcpp/line-map.c
@@ -99,7 +99,8 @@ location_adhoc_data_eq (const void *l1, const void *l2)
static int
location_adhoc_data_update (void **slot, void *data)
{
- *((char **) slot) += *((int64_t *) data);
+ *((char **) slot)
+ = (char *) ((uintptr_t) *((char **) slot) + *((ptrdiff_t *) data));
return 1;
}
@@ -221,7 +222,7 @@ get_combined_adhoc_loc (struct line_maps *set,
set->location_adhoc_data_map.allocated)
{
char *orig_data = (char *) set->location_adhoc_data_map.data;
- int64_t offset;
+ ptrdiff_t offset;
/* Cast away extern "C" from the type of xrealloc. */
line_map_realloc reallocator = (set->reallocator
? set->reallocator