PR preprocessor/83173: Enhance -fdump-internal-locations output
authorMike Gulick <mgulick@mathworks.com>
Tue, 27 Nov 2018 16:04:31 +0000 (16:04 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Tue, 27 Nov 2018 16:04:31 +0000 (16:04 +0000)
commitbc65bad27f066e2b91380071d65a8f6c6745c2a2
tree8fd44fa810e725cd4e7434022b0220e3c931a500
parentfb51a3a867e20f574bde3b929ec9ccfba6cc374b
PR preprocessor/83173: Enhance -fdump-internal-locations output

gcc/ChangeLog:
2018-11-27  Mike Gulick  <mgulick@mathworks.com>

PR preprocessor/83173
* input.c (dump_location_info): Dump reason and included_from
fields from line_map_ordinary struct.  Fix indentation when
location > 5 digits.
* diagnostic-show-locus.c (num_digits, num_digits): Move to
diagnostic.c to allow it to be utilized by input.c.
* diagnostic.c (num_digits, selftest::test_num_digits): Moved
here.
(selftest::diagnostic_c_tests): Run selftest::test_num_digits.
* diagnostic.h (num_digits): Add extern definition.

libcpp/ChangeLog:
2018-11-27  Mike Gulick  <mgulick@mathworks.com>

PR preprocessor/83173
* location-example.txt: Update example -fdump-internal-locations
output.

From-SVN: r266520
gcc/ChangeLog
gcc/diagnostic-show-locus.c
gcc/diagnostic.c
gcc/diagnostic.h
gcc/input.c
libcpp/ChangeLog
libcpp/location-example.txt