This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/52952] Wformat location info is bad (wrong column number)
- From: "steven at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 17 May 2012 21:19:28 +0000
- Subject: [Bug c/52952] Wformat location info is bad (wrong column number)
- Auto-submitted: auto-generated
- References: <bug-52952-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52952
--- Comment #2 from Steven Bosscher <steven at gcc dot gnu.org> 2012-05-17 21:19:28 UTC ---
To fix this properly, the input location should be tracked for the format
string. The location of the format string as argument to printf is available in
c-family/c-format.c:check_format_info() but there is no location information
for the characters within the string. The location for every character in the
format string should be recorded to pin-point the right line/column (think e.g.
for a broken long line).