aboutsummaryrefslogtreecommitdiff
path: root/libcpp/directives.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2021-12-17 05:45:02 -0500
committerJason Merrill <jason@redhat.com>2022-01-17 11:58:12 -0500
commitd3a57993359c9759990fe8f2aa4088684ed82190 (patch)
tree82399b3aeabcffc665f0808ade49811306a04557 /libcpp/directives.c
parent450c85b81f4dd67bf6211d307afdc0f3c07ef44f (diff)
downloadgcc-d3a57993359c9759990fe8f2aa4088684ed82190.zip
gcc-d3a57993359c9759990fe8f2aa4088684ed82190.tar.gz
gcc-d3a57993359c9759990fe8f2aa4088684ed82190.tar.bz2
diagnostic: avoid repeating include path
When a sequence of diagnostic messages bounces back and forth repeatedly between two includes, as with #include <map> std::map<const char*, const char*> m ("123", "456"); The output is quite a bit longer than necessary because we dump the include path each time it changes. I'd think we could print the include path once for each header file, and then expect that the user can look earlier in the output if they're wondering. gcc/ChangeLog: * diagnostic.h (struct diagnostic_context): Add includes_seen. * diagnostic.c (diagnostic_initialize): Initialize it. (diagnostic_finish): Clean it up. (includes_seen): New function. (diagnostic_report_current_module): Use it. gcc/testsuite/ChangeLog: * c-c++-common/cpp/line-2.c: Only expect includes once. * c-c++-common/cpp/line-3.c: Likewise.
Diffstat (limited to 'libcpp/directives.c')
0 files changed, 0 insertions, 0 deletions