diff options
author | dodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-18 08:44:49 +0000 |
---|---|---|
committer | dodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-18 08:44:49 +0000 |
commit | 2a688977bd98770a5014806135e7f65d859e0189 (patch) | |
tree | f0f196717a123734651cdeb6d17553bca251f465 /libcpp | |
parent | fc308daf596e0461a1fa91cc4fb7b3c5f371fab7 (diff) | |
download | gcc-2a688977bd98770a5014806135e7f65d859e0189.tar.gz |
Fix bootstrap on !NO_IMPLICIT_EXTERN_C and ia32 targets
libcpp/
* include/line-map.h (struct linemap_stats): Change the type of
the members from size_t to long.
* macro.c (macro_arg_token_iter_init): Unconditionally initialize
iter->location_ptr.
gcc/c-family/
* c-lex.c (fe_file_change): Use LINEMAP_SYSP when
!NO_IMPLICIT_EXTERN_C.
gcc/
* input.c (dump_line_table_statistics): Use long, not size_t.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180124 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp')
-rw-r--r-- | libcpp/ChangeLog | 8 | ||||
-rw-r--r-- | libcpp/include/line-map.h | 22 | ||||
-rw-r--r-- | libcpp/line-map.c | 2 | ||||
-rw-r--r-- | libcpp/macro.c | 4 |
4 files changed, 24 insertions, 12 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index c81c9676e76..bbb4085f012 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,11 @@ +2011-10-18 Dodji Seketeli <dodji@redhat.com> + + PR bootstrap/50760 + * include/line-map.h (struct linemap_stats): Change the type of + the members from size_t to long. + * macro.c (macro_arg_token_iter_init): Unconditionally initialize + iter->location_ptr. + 2011-10-17 Dodji Seketeli <dodji@redhat.com> * line-map.c (linemap_macro_map_loc_to_exp_point): Avoid setting a diff --git a/libcpp/include/line-map.h b/libcpp/include/line-map.h index 1e2a148e17b..ef98f5935b3 100644 --- a/libcpp/include/line-map.h +++ b/libcpp/include/line-map.h @@ -687,17 +687,17 @@ expanded_location linemap_expand_location_full (struct line_maps *, linemap_get_statistics. */ struct linemap_stats { - size_t num_ordinary_maps_allocated; - size_t num_ordinary_maps_used; - size_t ordinary_maps_allocated_size; - size_t ordinary_maps_used_size; - size_t num_expanded_macros; - size_t num_macro_tokens; - size_t num_macro_maps_used; - size_t macro_maps_allocated_size; - size_t macro_maps_used_size; - size_t macro_maps_locations_size; - size_t duplicated_macro_maps_locations_size; + long num_ordinary_maps_allocated; + long num_ordinary_maps_used; + long ordinary_maps_allocated_size; + long ordinary_maps_used_size; + long num_expanded_macros; + long num_macro_tokens; + long num_macro_maps_used; + long macro_maps_allocated_size; + long macro_maps_used_size; + long macro_maps_locations_size; + long duplicated_macro_maps_locations_size; }; /* Compute and return statistics about the memory consumption of some diff --git a/libcpp/line-map.c b/libcpp/line-map.c index 43e28565770..fb3be3a5f60 100644 --- a/libcpp/line-map.c +++ b/libcpp/line-map.c @@ -1180,7 +1180,7 @@ void linemap_get_statistics (struct line_maps *set, struct linemap_stats *s) { - size_t ordinary_maps_allocated_size, ordinary_maps_used_size, + long ordinary_maps_allocated_size, ordinary_maps_used_size, macro_maps_allocated_size, macro_maps_used_size, macro_maps_locations_size = 0, duplicated_macro_maps_locations_size = 0; diff --git a/libcpp/macro.c b/libcpp/macro.c index 2d0eeaa0388..f3139590d50 100644 --- a/libcpp/macro.c +++ b/libcpp/macro.c @@ -1278,6 +1278,10 @@ macro_arg_token_iter_init (macro_arg_token_iter *iter, iter->track_macro_exp_p = track_macro_exp_p; iter->kind = kind; iter->token_ptr = token_ptr; + /* Unconditionally initialize this so that the compiler doesn't warn + about iter->location_ptr being possibly uninitialized later after + this code has been inlined somewhere. */ + iter->location_ptr = NULL; if (track_macro_exp_p) iter->location_ptr = get_arg_token_location (arg, kind); #ifdef ENABLE_CHECKING |