aboutsummaryrefslogtreecommitdiff
path: root/gcc/diagnostic.h
diff options
context:
space:
mode:
authorMike Gulick <mgulick@mathworks.com>2018-11-27 16:04:31 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2018-11-27 16:04:31 +0000
commitbc65bad27f066e2b91380071d65a8f6c6745c2a2 (patch)
tree8fd44fa810e725cd4e7434022b0220e3c931a500 /gcc/diagnostic.h
parentfb51a3a867e20f574bde3b929ec9ccfba6cc374b (diff)
downloadgcc-upstream-bc65bad27f066e2b91380071d65a8f6c6745c2a2.tar.gz
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
Diffstat (limited to 'gcc/diagnostic.h')
-rw-r--r--gcc/diagnostic.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/diagnostic.h b/gcc/diagnostic.h
index a926f9bdd0b..596717e331c 100644
--- a/gcc/diagnostic.h
+++ b/gcc/diagnostic.h
@@ -421,4 +421,7 @@ extern char *build_message_string (const char *, ...) ATTRIBUTE_PRINTF_1;
extern void diagnostic_output_format_init (diagnostic_context *,
enum diagnostics_output_format);
+/* Compute the number of digits in the decimal representation of an integer. */
+extern int num_digits (int);
+
#endif /* ! GCC_DIAGNOSTIC_H */