+2017-06-09 David Malcolm <dmalcolm@redhat.com>
+
+ * include/line-map.h
+ (rich_location::fixits_cannot_be_auto_applied): New method.
+ (rich_location::fixits_can_be_auto_applied_p): New accessor.
+ (rich_location::m_fixits_cannot_be_auto_applied): New field.
+ * line-map.c (rich_location::rich_location): Initialize new field.
+
+2017-06-05 David Malcolm <dmalcolm@redhat.com>
+
+ * include/cpplib.h (struct cpp_callbacks): Add "comment"
+ callback.
+ * lex.c (_cpp_lex_direct): Call the comment callback if non-NULL.
+
+2017-05-02 David Malcolm <dmalcolm@redhat.com>
+
+ * include/line-map.h (class rich_location): Update description of
+ newline handling.
+ (class fixit_hint): Likewise.
+ (fixit_hint::ends_with_newline_p): New decl.
+ * line-map.c (rich_location::maybe_add_fixit): Support newlines
+ in fix-it hints that are insertions of single lines at the start
+ of a line. Don't consolidate into such fix-it hints.
+ (fixit_hint::ends_with_newline_p): New method.
+
+2017-05-01 David Malcolm <dmalcolm@redhat.com>
+
+ * include/line-map.h (source_range::intersects_line_p): Delete.
+ (rich_location::add_fixit): Delete.
+ (rich_location::maybe_add_fixit): New method.
+ (class fixit_hint): Reimplement in terms of...
+ (class fixit_replace): ...this.
+ (class fixit_insert): Delete.
+ * line-map.c (linemap_position_for_loc_and_offset): Drop overzealous
+ linemap_assert_fails.
+ (source_range::intersects_line_p): Rename to...
+ (fixit_hint::affects_line_p): New function.
+ (rich_location::add_fixit_insert_before): Reimplement in terms of
+ maybe_add_fixit, moving validation there.
+ (rich_location::add_fixit_insert_after): Likewise.
+ (column_before_p): Delete.
+ (rich_location::add_fixit_replace): Reimplement in terms of
+ maybe_add_fixit, moving validation there. Convert closed input range
+ to half-open range.
+ (rich_location::add_fixit): Delete.
+ (rich_location::maybe_add_fixit): New function.
+ (fixit_insert::fixit_insert): Delete.
+ (fixit_insert::~fixit_insert): Delete.
+ (fixit_insert::affects_line_p): Delete.
+ (fixit_insert::maybe_append_replace): Delete.
+ (fixit_replace::fixit_replace): Rename to...
+ (fixit_hint::fixit_hint): ...this, rewriting as necessary.
+ (fixit_replace::~fixit_replace): Delete.
+ (fixit_replace::affects_line_p): Delete.
+ (fixit_replace::maybe_append_replace): Rename to...
+ (fixit_hint::maybe_append): ...this, rewriting as necessary.
+
+2017-04-03 Jonathan Wakely <jwakely@redhat.com>
+
+ * include/line-map.h (LINEMAPS_MACRO_MAPS): Fix typo in comment.
+ * lex.c (search_line_fast): Likewise.
+ * pch.h (cpp_valid_state): Likewise.
+
+2017-03-21 Andreas Schwab <schwab@suse.de>
+
+ * lex.c (search_line_fast) [__ARM_NEON && __ARM_64BIT_STATE]:
+ Convert 64-bit value to boolean before passing to
+ __builtin_expect.
+
+2017-03-16 Jason Merrill <jason@redhat.com>
+
+ * init.c (cpp_init_builtins): Update __cplusplus for C++17.
+
+2017-02-09 Gerald Pfeifer <gerald@pfeifer.com>
+
+ * Makefile.in (po/$(PACKAGE).pot): Adjust bug reporting URL.
+
+2017-01-10 David Malcolm <dmalcolm@redhat.com>
+
+ PR c++/77949
+ * line-map.c (linemap_position_for_column): When calling
+ linemap_start_line, detect if a new linemap was created with
+ 0 column bits, and bail out early if this is the case.
+ (linemap_position_for_loc_and_offset): Replace overzealous
+ linemap_assert_fails with a simple conditional; use correct
+ bit count.
+
+2017-01-07 David Malcolm <dmalcolm@redhat.com>
+
+ PR c++/72803
+ * line-map.c (linemap_line_start): When determining if the highest
+ column given out so far will fit into a proposed change to the
+ current map, use the effective number of column bits, rather than
+ the total number of column + range bits.
+
+2017-01-01 Jakub Jelinek <jakub@redhat.com>
+
+ Update copyright years.
+
+2016-12-15 David Malcolm <dmalcolm@redhat.com>
+
+ PR preprocessor/78680
+ PR preprocessor/78811
+ * lex.c (_cpp_lex_direct): Only determine the end-location of
+ the token and build a range for non-reserved start locations.
+ Do not do it for EOF tokens.
+
+2016-12-12 David Malcolm <dmalcolm@redhat.com>
+
+ PR preprocessor/78680
+ * lex.c (_cpp_lex_direct): Ensure line notes are processed before
+ computing the end-point of the token.
+
+2016-11-23 Paolo Bonzini <bonzini@gnu.org>
+
+ * include/cpplib.h (struct cpp_options): Add new member
+ warn_expansion_to_defined.
+ (CPP_W_EXPANSION_TO_DEFINED): New enum member.
+ * expr.c (parse_defined): Warn for all uses of "defined"
+ in macros, and tie warning to CPP_W_EXPANSION_TO_DEFINED.
+ Make it a pedwarning instead of a warning.
+ * system.h (HAVE_DESIGNATED_INITIALIZERS): Do not use
+ "defined" in macros.
+
+2016-11-17 David Malcolm <dmalcolm@redhat.com>
+
+ * charset.c (cpp_interpret_string_1): Skip locations from
+ loc_reader when advancing 'p' when handling raw strings.
+
+2016-11-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR bootstrap/72823
+ * configure.ac (ENABLE_ASSERT_CHECKING): Define if gcc configure
+ would define that macro.
+ * configure: Regenerated.
+ * config.in: Regenerated.
+
+2016-11-08 Richard Earnshaw <rearnsha@arm.com>
+
+ * lex.c (search_line_fast): New implementation for AArch64.
+
+2016-10-25 David Malcolm <dmalcolm@redhat.com>
+
+ * files.c (destroy_cpp_file): Free file->path.
+
+2016-10-25 David Malcolm <dmalcolm@redhat.com>
+
+ * include/line-map.h (line_maps::~line_maps): New dtor.
+ (location_adhoc_data_fini): Delete decl.
+ * line-map.c (line_maps::~line_maps): New dtor.
+ (location_adhoc_data_fini): Delete.
+
+2016-10-21 Andris Pavenis <andris.pavenis@iki.fi>
+
+ PR preprocessor/71681
+ * files.c (remap_filename): Fix handling -remap in subdirectories.
+
+2016-10-12 Jakub Jelinek <jakub@redhat.com>
+
+ * include/cpplib.h (struct cpp_options): Add
+ cpp_warn_implicit_fallthrough.
+ * init.c (cpp_create_reader): Initialize it to 0.
+ * lex.c (fallthrough_comment_p): Handle different
+ cpp_warn_implicit_fallthrough levels. Whitespace fixes.
+
+2016-10-08 Jakub Jelinek <jakub@redhat.com>
+
+ * lex.c (fallthrough_comment_p): Accept Else, fallthrough.
+
+ * lex.c (fallthrough_comment_p): Extend to handle more common FALLTHRU
+ comment styles.
+
+ * lex.c (fallthrough_comment_p): Fix off-by-one size comparison
+ errors, cleanup.
+ (_cpp_lex_direct): Allow arbitrary comments in between
+ fallthrough_comment_p comment and following token.
+
+2016-10-04 Kelvin Nilsen <kelvin@gcc.gnu.org>
+
+ PR target/77847
+ * lex.c (search_line_fast): Add a FALLTHROUGH comment to correct
+ compiler error in the version of this function that is
+ conditionally compiled when GCC_VERSION >= 4005 and both
+ __ALTIVEC__ and __BIG_ENDIAN__ symbols are defined.
+
+2016-09-26 Marek Polacek <polacek@redhat.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR c/7652
+ * include/cpplib.h (PREV_FALLTHROUGH): Define.
+ * internal.h (CPP_FALLTHRU): Define.
+ * lex.c (fallthrough_comment_p): New function.
+ (_cpp_lex_direct): Set PREV_FALLTHROUGH on tokens succeeding a falls
+ through comment.
+
+2016-09-23 David Malcolm <dmalcolm@redhat.com>
+
+ PR preprocessor/77672
+ * charset.c (cpp_interpret_string_1): Add a source_range for the
+ NUL-terminator, using the location of the trailing quote of the
+ final string.
+
+2016-09-21 Jason Merrill <jason@redhat.com>
+
+ * line-map.c (linemap_location_from_macro_definition_p): New.
+ * line-map.h: Declare it.
+
+2016-09-15 David Malcolm <dmalcolm@redhat.com>
+
+ * include/line-map.h (class rich_location): Note that newlines
+ aren't supported in fix-it text.
+ * line-map.c (rich_location::add_fixit_insert_before): Reject
+ attempts to add fix-its containing newlines.
+ (rich_location::add_fixit_replace): Likewise.
+
+2016-09-13 David Malcolm <dmalcolm@redhat.com>
+
+ * include/line-map.h (class rich_location): Add description of
+ fix-it hints to leading comment.
+ (rich_location::add_fixit_insert): Rename both overloaded methods
+ to..
+ (rich_location::add_fixit_insert_before): ...this, updating their
+ comments.
+ (rich_location::add_fixit_insert_after): Two new overloaded
+ methods.
+ (rich_location::stop_supporting_fixits): New method.
+ * line-map.c (rich_location::add_fixit_insert): Rename both
+ overloaded methods to..
+ (rich_location::add_fixit_insert_before): ...this, updating their
+ comments.
+ (rich_location::add_fixit_insert_after): Two new methods.
+ (rich_location::reject_impossible_fixit): Split out
+ failure-handling into...
+ (rich_location::stop_supporting_fixits): New method.
+
+2016-09-02 David Malcolm <dmalcolm@redhat.com>
+
+ * include/line-map.h (rich_location::seen_impossible_fixit_p): New
+ accessor.
+
+2016-08-31 David Malcolm <dmalcolm@redhat.com>
+
+ * include/line-map.h (class fixit_remove): Remove stray decl.
+ (fixit_hint::affects_line_p): Make const.
+ (fixit_insert::affects_line_p): Likewise.
+ (fixit_replace::affects_line_p): Likewise.
+ * line-map.c (fixit_insert::affects_line_p): Likewise.
+ (fixit_replace::affects_line_p): Likewise.
+
+2016-08-30 David Malcolm <dmalcolm@redhat.com>
+
+ * include/line-map.h (class semi_embedded_vec): New class.
+ (semi_embedded_vec<T, NUM_EMBEDDED>::semi_embedded_vec): New ctor.
+ (semi_embedded_vec<T, NUM_EMBEDDED>::~semi_embedded_vec): New
+ dtor.
+ (semi_embedded_vec<T, NUM_EMBEDDED>::operator[]): New methods.
+ (semi_embedded_vec<T, NUM_EMBEDDED>::push): New method.
+ (semi_embedded_vec<T, NUM_EMBEDDED>::truncate): New method.
+ (rich_location::get_num_locations): Reimplement in terms of
+ m_ranges.
+ (rich_location::get_range): Make non-inline.
+ (rich_location::get_num_fixit_hints): Reimplement in terms of
+ m_fixit_hints.
+ (rich_location::add_fixit): New function.
+ (rich_location::MAX_RANGES): Rename to...
+ (rich_location::STATICALLY_ALLOCATED_RANGES): ...this.
+ (rich_location::MAX_FIXIT_HINTS): Rename to...
+ (rich_location::STATICALLY_ALLOCATED_RANGES): ...this, and make
+ private.
+ (rich_location::m_num_ranges): Eliminate in favor of...
+ (rich_location::m_ranges): ...this, converting from a fixed-size
+ array to a semi_embedded_vec.
+ (rich_location::m_num_fixit_hints): Eliminate in favor of...
+ (rich_location::m_fixit_hints): ...this, converting from a
+ fixed-size array to a semi_embedded_vec.
+ * line-map.c (rich_location::rich_location): Update for above
+ changes.
+ (rich_location::~rich_location): Likewise.
+ (rich_location::get_loc): Likewise.
+ (rich_location::get_range): New methods.
+ (rich_location::add_range): Update for above changes.
+ (rich_location::set_range): Likewise.
+ (rich_location::add_fixit_insert): Likewise.
+ (rich_location::add_fixit_replace): Likewise.
+ (rich_location::get_last_fixit_hint): Likewise.
+ (rich_location::reject_impossible_fixit): Likewise.
+ (rich_location::add_fixit): New method.
+
+2016-08-30 David Malcolm <dmalcolm@redhat.com>
+
+ * include/line-map.h (rich_location::add_fixit_insert): Add
+ comments. Add overload omitting the source_location param.
+ (rich_location::add_fixit_remove): Add comments. Add overloads
+ omitting the range, and accepting a source_location.
+ (rich_location::add_fixit_replace): Likewise.
+ * line-map.c (rich_location::add_fixit_insert): Add comments. Add
+ overload omitting the source_location param.
+ (rich_location::add_fixit_remove): Add comments. Add overloads
+ omitting the range, and accepting a source_location.
+ (rich_location::add_fixit_replace): Likewise.
+
+2016-08-26 David Malcolm <dmalcolm@redhat.com>
+
+ * include/line-map.h (get_pure_location): New decl.
+ * line-map.c (get_pure_location): Move here, from gcc/input.c, adding
+ a line_maps * param.
+ (rich_location::add_fixit_insert): Call get_pure_location on "where".
+ (rich_location::add_fixit_replace): Call get_pure_location on the
+ end-points.
+
+2016-08-26 David Malcolm <dmalcolm@redhat.com>
+
+ * include/line-map.h (rich_location): Eliminate unimplemented
+ constructor based on source_range.
+ (rich_location::get_last_fixit_hint): New method.
+ (rich_location::reject_impossible_fixit): New method.
+ (rich_location): Add fields m_line_table and
+ m_seen_impossible_fixit.
+ (fixit_hint::maybe_append_replace): New pure virtual function.
+ (fixit_insert::maybe_append_replace): New function.
+ (fixit_replace::maybe_append_replace): New function.
+ * line-map.c (rich_location::rich_location): Initialize
+ m_line_table and m_seen_impossible_fixit.
+ (rich_location::add_fixit_insert): Call
+ reject_impossible_fixit and bail out if true.
+ (column_before_p): New function.
+ (rich_location::add_fixit_replace): Call reject_impossible_fixit
+ and bail out if true. Attempt to consolidate with neighboring
+ fixits.
+ (rich_location::get_last_fixit_hint): New method.
+ (rich_location::reject_impossible_fixit): New method.
+ (fixit_insert::maybe_append_replace): New method.
+ (fixit_replace::maybe_append_replace): New method.
+
+2016-08-23 David Malcolm <dmalcolm@redhat.com>
+
+ * include/line-map.h (source_range::from_locations): New method.
+
+2016-08-19 David Malcolm <dmalcolm@redhat.com>
+
+ * include/line-map.h (fixit_hint::kind): Delete REPLACE.
+ (class fixit_remove): Delete.
+ * line-map.c (rich_location::add_fixit_remove): Reimplement
+ by calling add_fixit_replace with an empty string.
+ (fixit_remove::fixit_remove): Delete.
+ (fixit_remove::affects_line_p): Delete.
+
+2016-08-19 Joseph Myers <joseph@codesourcery.com>
+
+ PR c/32187
+ * include/cpplib.h (CPP_N_FLOATN, CPP_N_FLOATNX)
+ (CPP_N_WIDTH_FLOATN_NX, CPP_FLOATN_SHIFT, CPP_FLOATN_MAX): New
+ macros.
+ * expr.c (interpret_float_suffix): Handle fN, fNx, FN and FNx
+ suffixes.
+
+2016-08-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
+
+ * expr.c (eval_token): Append "evaluates to 0" to Wundef diagnostic.
+
+2016-08-18 David Malcolm <dmalcolm@redhat.com>
+
+ * directives.c (directive_names): New array.
+ (_cpp_handle_directive): Offer spelling suggestions for misspelled
+ directives.
+ * errors.c (cpp_diagnostic_at_richloc): New function.
+ (cpp_error_at_richloc): New function.
+ * include/cpplib.h (struct cpp_callbacks): Add field
+ "get_suggestion".
+ (cpp_error_at_richloc): New decl.
+
+2016-08-18 Marek Polacek <polacek@redhat.com>
+
+ PR c/7652
+ * pch.c (write_macdef): Add CPP_FALLTHRU.
+
+2016-08-12 Marek Polacek <polacek@redhat.com>
+
+ PR c/7652
+ * lex.c (search_line_fast): Add FALLTHRU.
+ (_cpp_lex_direct): Likewise.
+ (cpp_token_val_index): Adjust fall through comment.
+ * macro.c (parse_params): Add FALLTHRU.
+ * pch.c (count_defs): Adjust fall through comment.
+ (write_defs): Likewise.
+
+2016-08-06 David Malcolm <dmalcolm@redhat.com>
+
+ PR bootstrap/72823
+ * charset.c (_cpp_valid_ucn): Replace overzealous assert with one
+ that allows for char_range to be non-NULL when loc_reader is NULL.
+
+2016-08-05 David Malcolm <dmalcolm@redhat.com>
+
+ * charset.c (cpp_substring_ranges::cpp_substring_ranges): New
+ constructor.
+ (cpp_substring_ranges::~cpp_substring_ranges): New destructor.
+ (cpp_substring_ranges::add_range): New method.
+ (cpp_substring_ranges::add_n_ranges): New method.
+ (_cpp_valid_ucn): Add "char_range" and "loc_reader" params; if
+ they are non-NULL, read position information from *loc_reader
+ and update char_range->m_finish accordingly.
+ (convert_ucn): Add "char_range", "loc_reader", and "ranges"
+ params. If loc_reader is non-NULL, read location information from
+ it, and update *ranges accordingly, using char_range.
+ Conditionalize the conversion into tbuf on tbuf being non-NULL.
+ (convert_hex): Likewise, conditionalizing the call to
+ emit_numeric_escape on tbuf.
+ (convert_oct): Likewise.
+ (convert_escape): Add params "loc_reader" and "ranges". If
+ loc_reader is non-NULL, read location information from it, and
+ update *ranges accordingly. Conditionalize the conversion into
+ tbuf on tbuf being non-NULL.
+ (cpp_interpret_string): Rename to...
+ (cpp_interpret_string_1): ...this, adding params "loc_readers" and
+ "out". Use "to" to conditionalize the initialization and usage of
+ "tbuf", such as running the converter. If "loc_readers" is
+ non-NULL, use the instances within it, reading location
+ information from them, and passing them to convert_escape; likewise
+ write to "out" if loc_readers is non-NULL. Check for leading
+ quote and issue an error if it is not present. Update boundary
+ check from "== limit" to ">= limit" to protect against erroneous
+ location values to calls that are not parsing string literals.
+ (cpp_interpret_string): Reimplement in terms to
+ cpp_interpret_string_1.
+ (noop_error_cb): New function.
+ (cpp_interpret_string_ranges): New function.
+ (cpp_string_location_reader::cpp_string_location_reader): New
+ constructor.
+ (cpp_string_location_reader::get_next): New method.
+ * include/cpplib.h (class cpp_string_location_reader): New class.
+ (class cpp_substring_ranges): New class.
+ (cpp_interpret_string_ranges): New prototype.
+ * internal.h (_cpp_valid_ucn): Add params "char_range" and
+ "loc_reader".
+ * lex.c (forms_identifier_p): Pass NULL for new params to
+ _cpp_valid_ucn.
+
+2016-08-01 Andreas Schwab <schwab@suse.de>
+
+ * include/cpplib.h: Fix comment typo.
+
+2016-07-27 David Malcolm <dmalcolm@redhat.com>
+
+ * include/line-map.h (source_location): Fix line numbers in
+ comment.
+
+2016-07-11 David Malcolm <dmalcolm@redhat.com>
+
+ * include/line-map.h (LINE_MAP_MAX_LOCATION_WITH_PACKED_RANGES):
+ Move here from line-map.c.
+ (LINE_MAP_MAX_LOCATION_WITH_COLS): Likewise.
+ * line-map.c (LINE_MAP_MAX_LOCATION_WITH_PACKED_RANGES): Move from
+ here to line-map.h.
+ (LINE_MAP_MAX_LOCATION_WITH_COLS): Likewise.
+
+2016-06-22 David Malcolm <dmalcolm@redhat.com>
+
+ * directives.c (do_include_common): Pass on "location" to
+ _cpp_stack_include.
+ * errors.c (cpp_diagnostic): Reimplement in terms of...
+ (cpp_diagnostic_at): New function.
+ (cpp_error_at): New function.
+ (cpp_errno_filename): Add "loc" param and use it by using
+ cpp_error_at rather than cpp_error.
+ * files.c (find_file_in_dir): Add "loc" param and pass it to
+ open_file_failed.
+ (_cpp_find_file): Add "loc" param. Use it to convert calls to
+ cpp_error to cpp_error_at, and pass it to find_file_in_dir and
+ open_file_failed.
+ (read_file_guts): Add "loc" param. Use it to convert calls to
+ cpp_error to cpp_error_at. Pass it to cpp_errno_filename.
+ (read_file): Add "loc" param. Pass it to open_file_failed and
+ read_file_guts.
+ (should_stack_file): Add "loc" param. Pass it to read_file.
+ (_cpp_stack_file): Add "loc" param. Pass it to should_stack_file.
+ (_cpp_stack_include): Add "loc" param. Pass it to
+ _cpp_find_file and _cpp_stack_file.
+ (open_file_failed): Add "loc" param. Pass it to
+ cpp_errno_filename.
+ (_cpp_fake_include): Add 0 as a source_location in call to
+ _cpp_find_file.
+ (_cpp_compare_file_date): Likewise.
+ (cpp_push_include): Likewise for call to _cpp_stack_include.
+ (cpp_push_default_include): Likewise.
+ (_cpp_save_file_entries): Likewise for call to open_file_failed.
+ (_cpp_has_header): Likewise for call to _cpp_find_file.
+ * include/cpplib.h (cpp_errno_filename): Add source_location
+ param.
+ (cpp_error_at): New declaration.
+ * init.c (cpp_read_main_file): Add 0 as a source_location in calls
+ to _cpp_find_file and _cpp_stack_file.
+ * internal.h (_cpp_find_file): Add source_location param.
+ (_cpp_stack_file): Likewise.
+ (_cpp_stack_include): Likewise.
+
+2016-06-22 David Malcolm <dmalcolm@redhat.com>
+
+ * include/line-map.h (fixit_hint::get_start_loc): New pure virtual
+ function.
+ (fixit_hint::maybe_get_end_loc): Likewise.
+ (fixit_insert::get_start_loc): New function, implementing
+ fixit_hint::get_start_loc.
+ (fixit_insert::maybe_get_end_loc): New function, implementing
+ fixit_hint::maybe_get_end_loc.
+ (fixit_remove::get_start_loc): New function, implementing
+ fixit_hint::get_start_loc.
+ (fixit_remove::maybe_get_end_loc): New function, implementing
+ fixit_hint::maybe_get_end_loc.
+ (fixit_replace::get_start_loc): New function, implementing
+ fixit_hint::get_start_loc.
+ (fixit_replace::maybe_get_end_loc): New function, implementing
+ fixit_hint::maybe_get_end_loc.
+
+2016-06-21 John David Anglin <danglin@gcc.gnu.org>
+
+ * line-map.c (location_adhoc_data_update): Use int64_t instead of
+ long long.
+ (get_combined_adhoc_loc): Likewise.
+
+2016-06-01 Eduard Sanou <dhole@openmailbox.org>
+
+ * include/cpplib.h (cpp_callbacks): Add get_source_date_epoch
+ callback.
+ * include/cpplib.h (cpp_init_source_date_epoch): Remove prototype.
+ * init.c (cpp_init_source_date_epoch): Remove function.
+ * init.c (cpp_create_reader): Initialize pfile->source_date_epoch.
+ * internal.h (cpp_reader): Extend comment about source_date_epoch.
+ * macro.c (_cpp_builtin_macro_text): Use get_source_date_epoch
+ callback only once, read pfile->source_date_epoch on future passes.
+ Check that get_source_date_epoch callback is not NULL.
+
+2016-05-20 Martin Liska <mliska@suse.cz>
+
+ * config.in: Regenerated.
+ * configure: Likewise.
+ * configure.ac: Handle --enable-valgrind-annotations.
+ * lex.c (new_buff): Use ENABLE_VALGRIND_ANNOTATIONS instead
+ of ENABLE_VALGRIND_CHECKING.
+ (_cpp_free_buff): Likewise.
+
+2016-04-28 Eduard Sanou <dhole@openmailbox.org>
+ Matthias Klose <doko@debian.org>
+
+ * include/cpplib.h (cpp_init_source_date_epoch): Prototype.
+ * init.c (cpp_init_source_date_epoch): New function.
+ * internal.h: Added source_date_epoch variable to struct
+ cpp_reader to store a reproducible date.
+ * macro.c (_cpp_builtin_macro_text): Set pfile->date timestamp from
+ pfile->source_date_epoch instead of localtime if source_date_epoch is
+ set, to be used for __DATE__ and __TIME__ macros to help reproducible
+ builds.
+
+2016-04-13 Bernd Schmidt <bschmidt@redhat.com>
+
+ Patch from Roger Orr <rogero@howzatt.demon.co.uk>
+ PR preprocessor/69650
+ * directives.c (do_linemarker): Reread map after calling
+ cpp_get_token.
+
+2016-04-06 Richard Henderson <rth@redhat.com>
+
+ PR preprocessor/61817
+ PR preprocessor/69391
+ * internal.h (_cpp_builtin_macro_text): Update decl.
+ * macro.c (_cpp_builtin_macro_text): Accept location for __LINE__.
+ (builtin_macro): Accept a second location for __LINE__.
+ (enter_macro_context): Compute both virtual and real expansion
+ locations for the macro.
+
+2016-03-25 Bernd Schmidt <bschmidt@redhat.com>
+
+ PR lto/69650
+ * directives.c (do_linemarker): Test for file left but not entered
+ here.
+ * line-map.c (linemap_add): Not here.
+
+2016-03-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/70296
+ * include/cpplib.h (cpp_fun_like_macro_p): New prototype.
+ * macro.c (cpp_fun_like_macro_p): New function.
+
+2016-03-15 Richard Henderson <rth@redhat.com>
+
+ * line-map.c (new_linemap): Make alloc_size a size_t.
+
+2016-03-14 Jason Merrill <jason@redhat.com>
+
+ * expr.c (cpp_classify_number): Hex floats are new in C++1z.
+ * init.c (lang_defaults): Likewise.
+
+2016-03-09 David Malcolm <dmalcolm@redhat.com>
+
+ PR c/68473
+ PR c++/70105
+ * line-map.c (linemap_macro_map_loc_unwind_toward_spelling): Move
+ decl...
+ * include/line-map.h
+ (linemap_macro_map_loc_unwind_toward_spelling): ...here,
+ converting from static to extern.
+
+2016-03-09 David Malcolm <dmalcolm@redhat.com>
+
+ PR c/68473
+ PR c++/70105
+ * include/line-map.h (source_range::debug): Delete.
+ (struct location_range): Update comment. Replace
+ expanded_location fields "m_start", "m_finish", and "m_caret" with
+ a source_location field: "m_loc".
+ (class rich_location): Reword comment.
+ (rich_location::get_loc): Reimplement in terms of a new overloaded
+ variant which takes an unsigned int.
+ (rich_location::get_loc_addr): Delete.
+ (rich_location::add_range): Drop params "start" and "finish" in
+ favor of param "loc". Drop overloaded variants taking a
+ source_range or location_range *.
+ (rich_location::lazily_expand_location): Delete in favor of...
+ (rich_location::get_expanded_location): New decl.
+ (rich_location::m_loc): Delete field.
+ (rich_location::m_column_override): New field.
+ * line-map.c (rich_location::rich_location): Drop name of
+ line_maps * param. Update initializations for deletion of field
+ "m_loc" and addition of field "m_column_override". Reimplement
+ body as a call to add_range. Delete overloaded variant taking a
+ source_range.
+ (rich_location::get_loc): New function.
+ (rich_location::lazily_expand_location): Delete in favor of...
+ (rich_location::get_expanded_location): New function.
+ (rich_location::override_column): Reimplement.
+ (rich_location::add_range): Drop params "start" and "finish" in
+ favor of param "loc". Eliminate location expansion in favor of
+ simply storing loc. Drop overloaded variants taking a
+ source_range or location_range *.
+ (rich_location::set_range): Eliminate location expansion.
+
+2016-02-29 David Malcolm <dmalcolm@redhat.com>
+
+ PR preprocessor/69985
+ (linemap_position_for_loc_and_offset): Rename param from "offset"
+ to "column_offset". Right-shift the column_offset by m_range_bits
+ of the pertinent ordinary map whenever offsetting a
+ source_location. For clarity, offset the column by the column
+ offset, rather than the other way around.
+
+2016-02-23 David Malcolm <dmalcolm@redhat.com>
+
+ PR preprocessor/69126
+ PR preprocessor/69543
+ * line-map.c (linemap_compare_locations): At the function top,
+ replace inlined bodies of get_location_from_adhoc_loc with calls
+ to get_location_from_adhoc_loc. Add a pair of calls to
+ get_location_from_adhoc_loc at the bottom of the function, to
+ avoid meaningless comparisons of ad-hoc and non-ad-hoc locations.
+
+2016-02-08 David Malcolm <dmalcolm@redhat.com>
+
+ PR preprocessor/69664
+ * errors.c (cpp_diagnostic_with_line): Only call
+ rich_location::override_column if the column is non-zero.
+ * line-map.c (rich_location::override_column): Update columns
+ within m_ranges[0]. Add assertions to verify that doing so is
+ sane.
+
+2016-02-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/69628
+ * charset.c (cpp_interpret_charconst): Clear *PCHARS_SEEN
+ and *UNSIGNEDP if bailing out early due to errors.
+
+2016-01-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR pch/68176
+ * files.c (_cpp_find_file): Set file->implicit_preinclude even if
+ included from file->implicit_preinclude header.
+
+ * directives.c (destringize_and_run): Adjust prototype.
+
+2016-01-27 David Malcolm <dmalcolm@redhat.com>
+
+ PR preprocessor/69126
+ * directives.c (destringize_and_run): Add expansion_loc param; use
+ it when handling unexpanded pragmas to fixup the locations of the
+ synthesized tokens.
+ (_cpp_do__Pragma): Add expansion_loc param and use it when calling
+ destringize_and_run.
+ * internal.h (_cpp_do__Pragma): Add expansion_loc param.
+ * macro.c (builtin_macro): Pass expansion location of _Pragma to
+ _cpp_do__Pragma.
+
+2016-01-14 David Malcolm <dmalcolm@redhat.com>
+
+ PR preprocessor/69177
+ * line-map.c (LINE_MAP_MAX_LOCATION_WITH_PACKED_RANGES): New
+ constant.
+ (LINE_MAP_MAX_LOCATION_WITH_COLS): Add note about unit tests
+ to comment.
+ (can_be_stored_compactly_p): Reduce threshold from
+ LINE_MAP_MAX_LOCATION_WITH_COLS to
+ LINE_MAP_MAX_LOCATION_WITH_PACKED_RANGES.
+ (get_combined_adhoc_loc): Likewise.
+ (get_range_from_loc): Likewise.
+ (linemap_line_start): Ensure that a new ordinary map is created
+ when transitioning from range-packing being enabled to disabled,
+ at the LINE_MAP_MAX_LOCATION_WITH_PACKED_RANGES threshold. Set
+ range_bits to 0 for new ordinary maps when beyond this limit.
+ Prevent the "increase the column bits of a freshly created map"
+ optimization if the range bits has reduced.
+
+2016-01-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/69145
+ * files.c (cpp_included_before): If IS_ADHOC_LOC (location), lookup
+ real location from the line_table.
+
+2016-01-04 Jakub Jelinek <jakub@redhat.com>
+
+ Update copyright years.
+
+2015-12-22 David Malcolm <dmalcolm@redhat.com>
+
+ * line-map.c (get_combined_adhoc_loc): Remove condition
+ on locus < RESERVED_LOCATION_COUNT when considering
+ whether a caret == start == finish location can be
+ simply stored as the caret location.
+
+2015-12-07 David Malcolm <dmalcolm@redhat.com>
+
+ * include/line-map.h (rich_location::set_range): Add line_maps *
+ param; convert param from source_range to source_location. Drop
+ "overwrite_loc_p" param.
+ * line-map.c (rich_location::set_range): Likewise, acting as if
+ "overwrite_loc_p" were true, and getting range from the location.
+
+2015-11-20 David Malcolm <dmalcolm@redhat.com>
+
+ PR 62314
+ * include/line-map.h (source_range::intersects_line_p): New
+ method.
+ (rich_location::~rich_location): New.
+ (rich_location::add_fixit_insert): New method.
+ (rich_location::add_fixit_remove): New method.
+ (rich_location::add_fixit_replace): New method.
+ (rich_location::get_num_fixit_hints): New accessor.
+ (rich_location::get_fixit_hint): New accessor.
+ (rich_location::MAX_FIXIT_HINTS): New constant.
+ (rich_location::m_num_fixit_hints): New field.
+ (rich_location::m_fixit_hints): New field.
+ (class fixit_hint): New class.
+ (class fixit_insert): New class.
+ (class fixit_remove): New class.
+ (class fixit_replace): New class.
+ * line-map.c (source_range::intersects_line_p): New method.
+ (rich_location::rich_location): Add initialization of
+ m_num_fixit_hints to both ctors.
+ (rich_location::~rich_location): New.
+ (rich_location::add_fixit_insert): New method.
+ (rich_location::add_fixit_remove): New method.
+ (rich_location::add_fixit_replace): New method.
+ (fixit_insert::fixit_insert): New.
+ (fixit_insert::~fixit_insert): New.
+ (fixit_insert::affects_line_p): New.
+ (fixit_remove::fixit_remove): New.
+ (fixit_remove::affects_line_p): New.
+ (fixit_replace::fixit_replace): New.
+ (fixit_replace::~fixit_replace): New.
+ (fixit_replace::affects_line_p): New.
+
+2015-11-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR preprocessor/60736
+ * include/cpplib.h (cpp_errno_filename): New prototype.
+ * errors.c (cpp_errno): Don't handle msgid "" specially, use
+ _(msgid) instead of msgid as argument to cpp_error.
+ (cpp_errno_filename): New function.
+ * files.c (read_file_guts): Use cpp_errno_filename instead of
+ cpp_errno.
+ (open_file_failed): Likewise. Use file->name if file->path is NULL
+ in diagnostics.
+
+2015-11-13 David Malcolm <dmalcolm@redhat.com>
+
+ * errors.c (cpp_diagnostic): Pass pfile->line_table to
+ rich_location ctor.
+ (cpp_diagnostic_with_line): Likewise.
+ * include/cpplib.h (struct cpp_token): Update comment for src_loc
+ to indicate that the range of the token is "baked into" the
+ source_location.
+ * include/line-map.h (source_location): Update the descriptive
+ comment to reflect the packing scheme for short ranges, adding
+ worked examples of location encoding.
+ (struct line_map_ordinary): Drop field "column_bits" in favor
+ of field "m_column_and_range_bits"; add field "m_range_bits".
+ (ORDINARY_MAP_NUMBER_OF_COLUMN_BITS): Delete.
+ (location_adhoc_data): Add source_range field.
+ (struct line_maps): Add fields "default_range_bits",
+ "num_optimized_ranges" and "num_unoptimized_ranges".
+ (get_combined_adhoc_loc): Add source_range param.
+ (get_range_from_loc): New declaration.
+ (pure_location_p): New prototype.
+ (COMBINE_LOCATION_DATA): Add source_range param.
+ (SOURCE_LINE): Update for renaming of column_bits.
+ (SOURCE_COLUMN): Likewise. Shift the column right by the map's
+ range_bits.
+ (LAST_SOURCE_LINE_LOCATION): Update for renaming of column_bits.
+ (linemap_position_for_line_and_column): Add line_maps * params.
+ (rich_location::rich_location): Likewise.
+ * lex.c (_cpp_lex_direct): Capture the range of the token, baking
+ it into token->src_loc via a call to COMBINE_LOCATION_DATA.
+ * line-map.c (LINE_MAP_MAX_COLUMN_NUMBER): Reduce from 1U << 17 to
+ 1U << 12.
+ (location_adhoc_data_hash): Add the src_range into
+ the hash value.
+ (location_adhoc_data_eq): Require equality of the src_range
+ values.
+ (can_be_stored_compactly_p): New function.
+ (get_combined_adhoc_loc): Add src_range param, and store it,
+ via a bit-packing scheme for short ranges, otherwise within the
+ lookaside table. Remove the requirement that data is non-NULL.
+ (get_range_from_adhoc_loc): New function.
+ (get_range_from_loc): New function.
+ (pure_location_p): New function.
+ (linemap_add): Ensure that start_location has zero for the
+ range_bits, unless we're past LINE_MAP_MAX_LOCATION_WITH_COLS.
+ Initialize range_bits to zero. Assert that the start_location
+ is "pure".
+ (linemap_line_start): Assert that the
+ column_and_range_bits >= range_bits.
+ Update determinination of whether we need to start a new map
+ using the effective column bits, without the range bits.
+ Use the set's default_range_bits in new maps, apart from
+ those with column_bits == 0, which should also have 0 range_bits.
+ Increase the column bits for new maps by the range bits.
+ When adding lines to an existing map, use set->highest_line
+ directly rather than offsetting highest by SOURCE_COLUMN.
+ Add assertions to sanity-check the return value.
+ (linemap_position_for_column): Offset to_column by range_bits.
+ Update set->highest_location if necessary.
+ (linemap_position_for_line_and_column): Add line_maps * param.
+ Update the calculation to offset the column by range_bits, and
+ conditionalize it on being <= LINE_MAP_MAX_LOCATION_WITH_COLS.
+ Bound it by LINEMAPS_MACRO_LOWEST_LOCATION. Update
+ set->highest_location if necessary.
+ (linemap_position_for_loc_and_offset): Handle ad-hoc locations;
+ pass "set" to linemap_position_for_line_and_column.
+ (linemap_macro_map_loc_unwind_toward_spelling): Add line_maps
+ param. Handle ad-hoc locations.
+ (linemap_location_in_system_header_p): Pass on "set" to call to
+ linemap_macro_map_loc_unwind_toward_spelling.
+ (linemap_macro_loc_to_spelling_point): Retain ad-hoc locations.
+ Pass on "set" to call to
+ linemap_macro_map_loc_unwind_toward_spelling.
+ (linemap_resolve_location): Retain ad-hoc locations. Pass on
+ "set" to call to linemap_macro_map_loc_unwind_toward_spelling.
+ (linemap_unwind_toward_expansion): Pass on "set" to call to
+ linemap_macro_map_loc_unwind_toward_spelling.
+ (linemap_expand_location): Extract the data pointer before
+ extracting the location.
+ (rich_location::rich_location): Add line_maps param; use it to
+ extract the range from the source_location.
+ * location-example.txt: Regenerate, showing new representation.
+
+2015-11-06 David Malcolm <dmalcolm@redhat.com>
+
+ * errors.c (cpp_diagnostic): Update for change in signature
+ of "error" callback.
+ (cpp_diagnostic_with_line): Likewise, calling override_column
+ on the rich_location.
+ * include/cpplib.h (struct cpp_callbacks): Within "error"
+ callback, convert param from source_location to rich_location *,
+ and drop column_override param.
+ * include/line-map.h (struct source_range): New struct.
+ (struct location_range): New struct.
+ (class rich_location): New class.
+ (linemap_client_expand_location_to_spelling_point): New declaration.
+ * line-map.c (rich_location::rich_location): New ctors.
+ (rich_location::lazily_expand_location): New method.
+ (rich_location::override_column): New method.
+ (rich_location::add_range): New methods.
+ (rich_location::set_range): New method.
+
+2015-11-06 David Malcolm <dmalcolm@redhat.com>
+
+ * include/line-map.h (struct linemap_stats): Add fields
+ "adhoc_table_size" and "adhoc_table_entries_used".
+ * line-map.c (linemap_get_statistics): Populate above fields.
+
+2015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
+
+ * config.in: Regenerate.
+ * configure: Regenerate.
+ * configure.ac: Remove ENABLE_CHECKING.
+
+2015-11-03 Uros Bizjak <ubizjak@gmail.com>
+
+ * lex.c (search_line_sse42): Correctly advance the pointer to an
+ aligned address.
+
+2015-11-02 David Malcolm <dmalcolm@redhat.com>
+
+ * include/line-map.h (source_location): In the table in the
+ descriptive comment, show UNKNOWN_LOCATION, BUILTINS_LOCATION,
+ LINE_MAP_MAX_LOCATION_WITH_COLS, LINE_MAP_MAX_SOURCE_LOCATION.
+ Add notes about ad-hoc values.
+
+2015-10-21 Mikhail Maltsev <maltsevm@gmail.com>
+
+ * include/line-map.h: Use CHECKING_P instead of ENABLE_CHECKING.
+ * init.c: Likewise.
+ * macro.c (struct macro_arg_token_iter, set_arg_token,
+ macro_arg_token_iter_init, macro_arg_token_iter_forward,
+ macro_arg_token_iter_get_token, macro_arg_token_iter_get_location,
+ alloc_expanded_arg_mem, _cpp_backup_tokens): Likewise.
+
+ * config.in: Regenerate.
+ * configure: Regenerate.
+ * configure.ac (CHECKING_P): Define.
+ * system.h (fancy_abort): Declare.
+ (abort): Define.
+ (gcc_assert): Define. Use CHECKING_P.
+
+2015-10-13 Mikhail Maltsev <maltsevm@gmail.com>
+
+ * system.h (CHECKING_P, gcc_checking_assert): Define.
+
+2015-09-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ PR c/66415
+ * line-map.c (linemap_position_for_loc_and_offset): Handle the
+ case of long lines encoded in multiple maps.
+
+2015-09-07 Marek Polacek <polacek@redhat.com>
+
+ * system.h (INTTYPE_MINIMUM): Rewrite to avoid shift warning.
+
+2015-08-06 Yaakov Selkowitz <yselkowi@redhat.com>
+
+ * configure: Regenerate.
+
+2015-07-08 Thomas Schwinge <thomas@codesourcery.com>
+
+ * include/line-map.h (RESERVED_LOCATION_COUNT): Change type to
+ source_location.
+
+2015-07-02 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR preprocessor/53690
+ * charset.c (_cpp_valid_ucn): Add cppchar_t * parameter and change
+ return type to bool. Fix encoding of \u0000 and \U00000000 in C++.
+ (convert_ucn): Adjust call.
+ * lex.c (forms_identifier_p): Likewise.
+ * internal.h (_cpp_valid_ucn): Adjust declaration.
+
+2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
+
+ Implement N4197 - Adding u8 character literals
+ * include/cpplib.h (UTF8CHAR, UTF8CHAR_USERDEF): New cpp tokens;
+ (struct cpp_options): Add utf8_char_literals.
+ * init.c (struct lang_flags): Add utf8_char_literals;
+ (struct lang_flags lang_defaults): Add column for utf8_char_literals.
+ * macro.c (stringify_arg()): Treat CPP_UTF8CHAR token;
+ * expr.c (cpp_userdef_char_remove_type(), cpp_userdef_char_add_type()):
+ Treat CPP_UTF8CHAR_USERDEF, CPP_UTF8CHAR tokens;
+ (cpp_userdef_char_p()): Treat CPP_UTF8CHAR_USERDEF token;
+ (eval_token(), _cpp_parse_expr()): Treat CPP_UTF8CHAR token.
+ * lex.c (lex_string(), _cpp_lex_direct()): Include CPP_UTF8CHAR tokens.
+ * charset.c (converter_for_type(), cpp_interpret_charconst()):
+ Treat CPP_UTF8CHAR token.
+
+2015-06-30 Uros Bizjak <ubizjak@gmail.com>
+
+ * lex.c (search_line_sse42) [__GCC_ASM_FLAG_OUTPUTS__]: New main
+ loop using asm flag outputs.
+
+2015-06-08 Marek Polacek <polacek@redhat.com>
+
+ PR c/66415
+ * line-map.c (linemap_position_for_loc_and_offset): Remove
+ linemap_assert_fails; reverse conditions.
+
+2015-05-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ * line-map.c (LINE_MAP_MAX_COLUMN_NUMBER
+ LINE_MAP_MAX_LOCATION_WITH_COLS,LINE_MAP_MAX_SOURCE_LOCATION):
+ New constants.
+ (linemap_line_start): Use them.
+ (linemap_position_for_column): Use them.
+
+2015-05-20 David Malcolm <dmalcolm@redhat.com>
+
+ * include/line-map.h (MAP_START_LOCATION): Eliminate the non-const
+ variant, and tweak comment for the const variant.
+ (ORDINARY_MAP_STARTING_LINE_NUMBER): Drop the non-const variant.
+ (ORDINARY_MAP_INCLUDER_FILE_INDEX): Likewise.
+ (ORDINARY_MAP_IN_SYSTEM_HEADER_P): Likewise.
+ (SET_ORDINARY_MAP_NUMBER_OF_COLUMN_BITS): Delete.
+ (ORDINARY_MAP_FILE_NAME): Drop the non-const variant.
+ (MACRO_MAP_MACRO): Likewise.
+ (MACRO_MAP_NUM_MACRO_TOKENS): Likewise.
+ (MACRO_MAP_LOCATIONS): Likewise.
+ (MACRO_MAP_EXPANSION_POINT_LOCATION): Likewise.
+ * line-map.c (linemap_add): Replace writes through macros with
+ direct field accesses.
+ (linemap_enter_macro): Likewise.
+ (linemap_line_start): Likewise.
+
+2015-05-19 David Malcolm <dmalcolm@redhat.com>
+
+ * directives.c (do_line): Strengthen local "map" from
+ const line_map * to const line_map_ordinary *.
+ (do_linemarker): Likewise.
+ (_cpp_do_file_change): Assert that we're not dealing with
+ a macro map. Introduce local "ord_map" via a call to
+ linemap_check_ordinary, guarded within the check for
+ non-NULL. Use it for typesafety.
+ * files.c (cpp_make_system_header): Strengthen local "map" from
+ const line_map * to const line_map_ordinary *.
+ * include/cpplib.h (struct cpp_callbacks): Likewise for second
+ parameter of "file_change" callback.
+ * include/line-map.h (struct line_map): Convert from a struct
+ containing a union to a base class.
+ (struct line_map_ordinary): Convert to a subclass of line_map.
+ (struct line_map_macro): Likewise.
+ (linemap_check_ordinary): Strengthen return type from line_map *
+ to line_map_ordinary *, and add a const-variant.
+ (linemap_check_macro): New pair of functions.
+ (ORDINARY_MAP_STARTING_LINE_NUMBER): Strengthen param from
+ const line_map * to const line_map_ordinary *, eliminating call
+ to linemap_check_ordinary. Likewise for the non-const variant.
+ (ORDINARY_MAP_INCLUDER_FILE_INDEX): Likewise.
+ (ORDINARY_MAP_IN_SYSTEM_HEADER_P): Likewise.
+ (ORDINARY_MAP_NUMBER_OF_COLUMN_BITS): Likewise.
+ (ORDINARY_MAP_FILE_NAME): Likewise.
+ (MACRO_MAP_MACRO): Strengthen param from const line_map * to
+ const line_map_macro *. Likewise for the non-const variant.
+ (MACRO_MAP_NUM_MACRO_TOKENS): Likewise.
+ (MACRO_MAP_LOCATIONS): Likewise.
+ (MACRO_MAP_EXPANSION_POINT_LOCATION): Likewise.
+ (struct maps_info): Replace with...
+ (struct maps_info_ordinary):...this and...
+ (struct maps_info_macro): ...this.
+ (struct line_maps): Convert fields "info_ordinary" and
+ "info_macro" to the above new structs.
+ (LINEMAPS_MAP_INFO): Delete both functions.
+ (LINEMAPS_MAPS): Likewise.
+ (LINEMAPS_ALLOCATED): Rewrite both variants to avoid using
+ LINEMAPS_MAP_INFO.
+ (LINEMAPS_USED): Likewise.
+ (LINEMAPS_CACHE): Likewise.
+ (LINEMAPS_MAP_AT): Likewise.
+ (LINEMAPS_ORDINARY_MAPS): Strengthen return type from line_map *
+ to line_map_ordinary *.
+ (LINEMAPS_ORDINARY_MAP_AT): Likewise.
+ (LINEMAPS_LAST_ORDINARY_MAP): Likewise.
+ (LINEMAPS_LAST_ALLOCATED_ORDINARY_MAP): Likewise.
+ (LINEMAPS_MACRO_MAPS): Strengthen return type from line_map * to
+ line_map_macro *.
+ (LINEMAPS_MACRO_MAP_AT): Likewise.
+ (LINEMAPS_LAST_MACRO_MAP): Likewise.
+ (LINEMAPS_LAST_ALLOCATED_MACRO_MAP): Likewise.
+ (linemap_map_get_macro_name): Strengthen param from
+ const line_map * to const line_map_macro *.
+ (SOURCE_LINE): Strengthen first param from const line_map * to
+ const line_map_ordinary *, removing call to
+ linemap_check_ordinary.
+ (SOURCE_COLUMN): Likewise.
+ (LAST_SOURCE_LINE_LOCATION): Likewise.
+ (LAST_SOURCE_LINE): Strengthen first param from const line_map *
+ to const line_map_ordinary *.
+ (LAST_SOURCE_COLUMN): Likewise.
+ (INCLUDED_FROM): Strengthen return type from line_map * to
+ line_map_ordinary *., and second param from const line_map *
+ to const line_map_ordinary *, removing call to
+ linemap_check_ordinary.
+ (MAIN_FILE_P): Strengthen param from const line_map * to
+ const line_map_ordinary *, removing call to
+ linemap_check_ordinary.
+ (linemap_position_for_line_and_column): Strengthen param from
+ const line_map * to const line_map_ordinary *.
+ (LINEMAP_FILE): Strengthen param from const line_map * to
+ const line_map_ordinary *, removing call to
+ linemap_check_ordinary.
+ (LINEMAP_LINE): Likewise.
+ (LINEMAP_SYSP): Likewise.
+ (linemap_resolve_location): Strengthen final param from
+ const line_map ** to const line_map_ordinary **.
+ * internal.h (CPP_INCREMENT_LINE): Likewise for local "map".
+ (linemap_enter_macro): Strengthen return type from
+ const line_map * to const line_map_macro *.
+ (linemap_add_macro_token): Likewise for first param.
+ * line-map.c (linemap_check_files_exited): Strengthen local "map"
+ from const line_map * to const line_map_ordinary *.
+ (new_linemap): Introduce local "map_size" and use it when
+ calculating how large the buffer should be. Rewrite based
+ on change of info_macro and info_ordinary into distinct types.
+ (linemap_add): Strengthen locals "map" and "from" from line_map *
+ to line_map_ordinary *.
+ (linemap_enter_macro): Strengthen return type from
+ const line_map * to const line_map_macro *, and local "map" from
+ line_map * to line_map_macro *.
+ (linemap_add_macro_token): Strengthen param "map" from
+ const line_map * to const line_map_macro *.
+ (linemap_line_start): Strengthen local "map" from line_map * to
+ line_map_ordinary *.
+ (linemap_position_for_column): Likewise.
+ (linemap_position_for_line_and_column): Strengthen first param
+ from const line_map * to const line_map_ordinary *.
+ (linemap_position_for_loc_and_offset): Strengthen local "map" from
+ const line_map * to const line_map_ordinary *.
+ (linemap_ordinary_map_lookup): Likewise for return type and locals
+ "cached" and "result".
+ (linemap_macro_map_lookup): Strengthen return type and locals
+ "cached" and "result" from const line_map * to
+ const line_map_macro *.
+ (linemap_macro_map_loc_to_exp_point): Likewise for param "map".
+ (linemap_macro_map_loc_to_def_point): Likewise.
+ (linemap_macro_map_loc_unwind_toward_spelling): Likewise.
+ (linemap_get_expansion_line): Strengthen local "map" from
+ const line_map * to const line_map_ordinary *.
+ (linemap_get_expansion_filename): Likewise.
+ (linemap_map_get_macro_name): Strengthen param from
+ const line_map * to const line_map_macro *.
+ (linemap_location_in_system_header_p): Add call to
+ linemap_check_ordinary in region guarded by
+ !linemap_macro_expansion_map_p. Introduce local "macro_map" via
+ linemap_check_macro in other region, using it in place of "map"
+ for typesafety.
+ (first_map_in_common_1): Add calls to linemap_check_macro.
+ (trace_include): Strengthen param "map" from const line_map * to
+ const line_map_ordinary *.
+ (linemap_macro_loc_to_spelling_point): Strengthen final param from
+ const line_map ** to const line_map_ordinary **. Replace a
+ C-style cast with a const_cast, and add calls to
+ linemap_check_macro and linemap_check_ordinary.
+ (linemap_macro_loc_to_def_point): Likewise.
+ (linemap_macro_loc_to_exp_point): Likewise.
+ (linemap_resolve_location): Strengthen final param from
+ const line_map ** to const line_map_ordinary **.
+ (linemap_unwind_toward_expansion): Introduce local "macro_map" via
+ a checked cast and use it in place of *map.
+ (linemap_unwind_to_first_non_reserved_loc): Strengthen local
+ "map1" from const line_map * to const line_map_ordinary *.
+ (linemap_expand_location): Introduce local "ord_map" via a checked
+ cast and use it in place of map.
+ (linemap_dump): Make local "map" const. Strengthen local
+ "includer_map" from line_map * to const line_map_ordinary *.
+ Introduce locals "ord_map" and "macro_map" via checked casts and
+ use them in place of "map" for typesafety.
+ (linemap_dump_location): Strengthen local "map" from
+ const line_map * to const line_map_ordinary *.
+ (linemap_get_file_highest_location): Update for elimination of
+ union.
+ (linemap_get_statistics): Strengthen local "cur_map" from
+ line_map * to const line_map_macro *. Update uses of sizeof to
+ use the appropriate line_map subclasses.
+ * macro.c (_cpp_warn_if_unused_macro): Add call to
+ linemap_check_ordinary.
+ (builtin_macro): Strengthen local "map" from const line_map * to
+ const line_map_macro *.
+ (enter_macro_context): Likewise.
+ (replace_args): Likewise.
+ (tokens_buff_put_token_to): Likewise for param "map".
+ (tokens_buff_add_token): Likewise.
+
+2015-05-13 David Malcolm <dmalcolm@redhat.com>
+
+ * include/line-map.h (source_location): Add a reference to
+ location-example.txt to the descriptive comment.
+ * location-example.txt: New file.
+
+2015-05-13 David Malcolm <dmalcolm@redhat.com>
+
+ * include/line-map.h (MAX_SOURCE_LOCATION): Convert from a macro
+ to a const source_location.
+ (RESERVED_LOCATION_COUNT): Likewise.
+ (linemap_check_ordinary): Convert from a macro to a pair of inline
+ functions, for const/non-const arguments.
+ (MAP_START_LOCATION): Likewise.
+ (ORDINARY_MAP_STARTING_LINE_NUMBER): Likewise.
+ (ORDINARY_MAP_INCLUDER_FILE_INDEX): Likewise.
+ (ORDINARY_MAP_IN_SYSTEM_HEADER_P): Likewise.
+ (ORDINARY_MAP_NUMBER_OF_COLUMN_BITS): Convert from a macro to a
+ pair of inline functions, for const/non-const arguments, where the
+ latter is named...
+ (SET_ORDINARY_MAP_NUMBER_OF_COLUMN_BITS): New function.
+ (ORDINARY_MAP_FILE_NAME): Convert from a macro to a pair of inline
+ functions, for const/non-const arguments.
+ (MACRO_MAP_MACRO): Likewise.
+ (MACRO_MAP_NUM_MACRO_TOKENS): Likewise.
+ (MACRO_MAP_LOCATIONS): Likewise.
+ (MACRO_MAP_EXPANSION_POINT_LOCATION): Likewise.
+ (LINEMAPS_MAP_INFO): Likewise.
+ (LINEMAPS_MAPS): Likewise.
+ (LINEMAPS_ALLOCATED): Likewise.
+ (LINEMAPS_USED): Likewise.
+ (LINEMAPS_CACHE): Likewise.
+ (LINEMAPS_ORDINARY_CACHE): Likewise.
+ (LINEMAPS_MACRO_CACHE): Likewise.
+ (LINEMAPS_MAP_AT): Convert from a macro to an inline function.
+ (LINEMAPS_LAST_MAP): Likewise.
+ (LINEMAPS_LAST_ALLOCATED_MAP): Likewise.
+ (LINEMAPS_ORDINARY_MAPS): Likewise.
+ (LINEMAPS_ORDINARY_MAP_AT): Likewise.
+ (LINEMAPS_ORDINARY_ALLOCATED): Likewise.
+ (LINEMAPS_ORDINARY_USED): Likewise.
+ (LINEMAPS_LAST_ORDINARY_MAP): Likewise.
+ (LINEMAPS_LAST_ALLOCATED_ORDINARY_MAP): Likewise.
+ (LINEMAPS_MACRO_MAPS): Likewise.
+ (LINEMAPS_MACRO_MAP_AT): Likewise.
+ (LINEMAPS_MACRO_ALLOCATED): Likewise.
+ (LINEMAPS_MACRO_USED): Likewise.
+ (LINEMAPS_MACRO_LOWEST_LOCATION): Likewise.
+ (LINEMAPS_LAST_MACRO_MAP): Likewise.
+ (LINEMAPS_LAST_ALLOCATED_MACRO_MAP): Likewise.
+ (IS_ADHOC_LOC): Likewise.
+ (COMBINE_LOCATION_DATA): Likewise.
+ (SOURCE_LINE): Likewise.
+ (SOURCE_COLUMN): Likewise.
+ (LAST_SOURCE_LINE_LOCATION): Likewise.
+ (LAST_SOURCE_LINE): Likewise.
+ (LAST_SOURCE_COLUMN): Likewise.
+ (LAST_SOURCE_LINE_LOCATION)
+ (INCLUDED_FROM): Likewise.
+ (MAIN_FILE_P): Likewise.
+ (LINEMAP_FILE): Likewise.
+ (LINEMAP_LINE): Likewise.
+ (LINEMAP_SYSP): Likewise.
+ (linemap_location_before_p): Likewise.
+ * line-map.c (linemap_check_files_exited): Make local "map" const.
+ (linemap_add): Use SET_ORDINARY_MAP_NUMBER_OF_COLUMN_BITS.
+ (linemap_line_start): Likewise.
+
2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
* aclocal.m4: Regenerated with automake-1.11.6.
2014-12-02 Manuel López-Ibáñez <manu@gcc.gnu.org>
- * line-map.c (linemap_add): Fix typo.
- (linemap_line_start): Fix whitespace.
+ * line-map.c (linemap_add): Fix typo.
+ (linemap_line_start): Fix whitespace.
2014-11-29 John Schmerge <jbschmerge@gmail.com>
* include/mkdeps.h: Moved from gcc. Change header guard name.
* include/symtab.h: Moved from gcc/hashtable.h. Change header
guard name.
+\f
+Copyright (C) 2004-2017 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.