Don't suppress bogus usage of macros from system headers in -Wformat (PR c/78304)
gcc/ChangeLog: PR c/78304 * substring-locations.c (format_warning_va): Strengthen case 1 so that both endpoints of the substring must be within the format range for just the substring to be printed. gcc/testsuite/ChangeLog: PR c/78304 * gcc.dg/format/diagnostic-ranges.c (test_macro): Undef INT_FMT. (test_macro_2): New test. (test_macro_3): New test. (test_macro_4): New test. (test_non_contiguous_strings): Convert line number to line offset. * gcc.dg/format/pr78304-2.c: New test case. * gcc.dg/format/pr78304.c: New test case. From-SVN: r244453
Showing
gcc/testsuite/gcc.dg/format/pr78304-2.c
0 → 100644
gcc/testsuite/gcc.dg/format/pr78304.c
0 → 100644
Please
register
or
sign in
to comment