]> git.ipfire.org Git - thirdparty/gcc.git/commit
Support for 64-bit location_t: Internal parts
authorLewis Hyatt <lhyatt@gmail.com>
Mon, 28 Oct 2024 16:52:31 +0000 (12:52 -0400)
committerLewis Hyatt <lhyatt@gcc.gnu.org>
Sat, 30 Nov 2024 18:01:46 +0000 (13:01 -0500)
commit2ae0566243c8dacec17ff233e41688f05366d886
tree1719721bffac72de999b8d7e1cfbc281ef4a6c2e
parent8cc9d27e2db7d9f4867061c848c2d2c46a101371
Support for 64-bit location_t: Internal parts

Several of the selftests in diagnostic-show-locus.cc and input.cc are
sensitive to linemap internals. Adjust them here so they will support 64-bit
location_t if configured.

Likewise, handle 64-bit location_t in the support for
-fdump-internal-locations. As was done with the analyzer, convert to
(unsigned long long) explicitly so that 32- and 64-bit can be handled with
the same printf formats.

gcc/ChangeLog:

* diagnostic-show-locus.cc
(test_one_liner_fixit_validation_adhoc_locations): Adapt so it can
effectively test 7-bit ranges instead of 5-bit ranges.
(test_one_liner_fixit_validation_adhoc_locations_utf8): Likewise.
* input.cc (get_end_location): Adjust types to support 64-bit
location_t.
(write_digit_row): Likewise.
(dump_location_range): Likewise.
(dump_location_info): Likewise.
(class line_table_case): Likewise.
(test_accessing_ordinary_linemaps): Replace some hard-coded
constants with the values defined in line-map.h.
(for_each_line_table_case): Likewise.
gcc/diagnostic-show-locus.cc
gcc/input.cc