re PR c/52952 (Wformat location info is bad (wrong column number))
authorManuel López-Ibáñez <manu@gcc.gnu.org>
Thu, 21 May 2015 06:49:38 +0000 (06:49 +0000)
committerManuel López-Ibáñez <manu@gcc.gnu.org>
Thu, 21 May 2015 06:49:38 +0000 (06:49 +0000)
commit0fee2ac2882790ca549b1c5504f7fa1e59b25a39
tree339d4f9e9dc8f2baacaec5f92a172caf24d16c36
parenta4f238b6d7ecee86b9c0a664b44add65058b0a91
re PR c/52952 (Wformat location info is bad (wrong column number))

gcc/testsuite/ChangeLog:

2015-05-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>

PR c/52952
* gcc.dg/redecl-4.c: Update column numbers.
* gcc.dg/format/bitfld-1.c: Likewise.
* gcc.dg/format/attr-2.c: Likewise.
* gcc.dg/format/attr-6.c: Likewise.
* gcc.dg/format/attr-7.c (baz): Likewise.
* gcc.dg/format/asm_fprintf-1.c: Likewise.
* gcc.dg/format/attr-4.c: Likewise.
* gcc.dg/format/branch-1.c: Likewise.
* gcc.dg/format/c90-printf-1.c: Likewise. Add tests for column
locations within strings with embedded escape sequences.

gcc/c-family/ChangeLog:

2015-05-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>

PR c/52952
* c-format.c (location_column_from_byte_offset): New.
(location_from_offset): New.
(struct format_wanted_type): Add offset_loc field.
(check_format_info): Move handling of location for extra arguments
closer to the point of warning.
(check_format_info_main): Pass the result of location_from_offset
to warning_at.
(format_type_warning): Pass the result of location_from_offset
to warning_at.

From-SVN: r223470
12 files changed:
gcc/c-family/ChangeLog
gcc/c-family/c-format.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/format/asm_fprintf-1.c
gcc/testsuite/gcc.dg/format/attr-2.c
gcc/testsuite/gcc.dg/format/attr-4.c
gcc/testsuite/gcc.dg/format/attr-6.c
gcc/testsuite/gcc.dg/format/attr-7.c
gcc/testsuite/gcc.dg/format/bitfld-1.c
gcc/testsuite/gcc.dg/format/branch-1.c
gcc/testsuite/gcc.dg/format/c90-printf-1.c
gcc/testsuite/gcc.dg/redecl-4.c