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: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 22 May 2012 10:55:49 +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 #7 from Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> 2012-05-22 10:55:49 UTC ---
(In reply to comment #5)
> The format string could be even something like
> void f() {
> __builtin_printf(
> u8R"abcd(%.)abcd"
> "*d");
> }
> So, the question is, if we have a way to find from the source_location on the
> ADDR_EXPR around STRING_CST the original non-concatenated tokens, and given
> index into the (possibly) translated STRING_CST redo the lexing of those
> tokens, looking at which byte in the source tokens maps to that offset in the
> STRING_CST.
Is it possible to re-preprocess some tokens only? Do the line-maps keep track
of the locations of the tokens which make up a single string? If not, we would
need to create new source locations on-the-fly. Is this possible at all?