mirror of git://gcc.gnu.org/git/gcc.git
line-map.c (location_adhoc_data_update): Perform addition in uintptr_t type rather than char * type.
* line-map.c (location_adhoc_data_update): Perform addition in uintptr_t type rather than char * type. Read *data using ptrdiff_t type instead of int64_t. (get_combined_adhoc_loc): Change offset type to ptrdiff_t from int64_t. From-SVN: r249446
This commit is contained in:
parent
d54d1fc3bc
commit
6d52273137
|
|
@ -1,3 +1,11 @@
|
||||||
|
2017-06-21 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* line-map.c (location_adhoc_data_update): Perform addition in
|
||||||
|
uintptr_t type rather than char * type. Read *data using
|
||||||
|
ptrdiff_t type instead of int64_t.
|
||||||
|
(get_combined_adhoc_loc): Change offset type to ptrdiff_t from
|
||||||
|
int64_t.
|
||||||
|
|
||||||
2017-06-20 David Malcolm <dmalcolm@redhat.com>
|
2017-06-20 David Malcolm <dmalcolm@redhat.com>
|
||||||
|
|
||||||
* include/line-map.h (class rich_location): Document that attempts
|
* include/line-map.h (class rich_location): Document that attempts
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,8 @@ location_adhoc_data_eq (const void *l1, const void *l2)
|
||||||
static int
|
static int
|
||||||
location_adhoc_data_update (void **slot, void *data)
|
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;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -221,7 +222,7 @@ get_combined_adhoc_loc (struct line_maps *set,
|
||||||
set->location_adhoc_data_map.allocated)
|
set->location_adhoc_data_map.allocated)
|
||||||
{
|
{
|
||||||
char *orig_data = (char *) set->location_adhoc_data_map.data;
|
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. */
|
/* Cast away extern "C" from the type of xrealloc. */
|
||||||
line_map_realloc reallocator = (set->reallocator
|
line_map_realloc reallocator = (set->reallocator
|
||||||
? set->reallocator
|
? set->reallocator
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue