public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/42014] Inconsistent column number display for "In file incuded from"
[not found] <bug-42014-4@http.gcc.gnu.org/bugzilla/>
@ 2013-05-10 6:58 ` skannan at redhat dot com
2014-10-28 15:39 ` vreeland.justin at gmail dot com
2021-09-02 2:53 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 3+ messages in thread
From: skannan at redhat dot com @ 2013-05-10 6:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42014
Shakthi Kannan <skannan at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |skannan at redhat dot com
--- Comment #3 from Shakthi Kannan <skannan at redhat dot com> ---
Created attachment 30079
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30079&action=edit
Added LAST_SOURCE_COLUMN in while loop
Attached patch adds LAST_SOURCE_COLUMN to pp_verbatim function in the while
loop present in diagnostic_report_current_module() to make the output
consistent.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug preprocessor/42014] Inconsistent column number display for "In file incuded from"
[not found] <bug-42014-4@http.gcc.gnu.org/bugzilla/>
2013-05-10 6:58 ` [Bug preprocessor/42014] Inconsistent column number display for "In file incuded from" skannan at redhat dot com
@ 2014-10-28 15:39 ` vreeland.justin at gmail dot com
2021-09-02 2:53 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 3+ messages in thread
From: vreeland.justin at gmail dot com @ 2014-10-28 15:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42014
Justin Vreeland <vreeland.justin at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |vreeland.justin at gmail dot com
--- Comment #4 from Justin Vreeland <vreeland.justin at gmail dot com> ---
Created attachment 33832
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33832&action=edit
adds column to output
The currently attached patch doesn't apply cleanly I'm uploading another that
does, it's essentially the same patch.
Without patch:
In file included from /usr/include/c++/4.9.1/iostream:39:0,
from test.cxx:1:
With patch:
In file included from
/extra/gcc/bug42014/patched/gcc/pkg/gcc/usr/include/c++/4.9.1/iostream:39:0,
from test.cxx:1,0:
Which matches the error location.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug preprocessor/42014] Inconsistent column number display for "In file incuded from"
[not found] <bug-42014-4@http.gcc.gnu.org/bugzilla/>
2013-05-10 6:58 ` [Bug preprocessor/42014] Inconsistent column number display for "In file incuded from" skannan at redhat dot com
2014-10-28 15:39 ` vreeland.justin at gmail dot com
@ 2021-09-02 2:53 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-02 2:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42014
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Since r11-2092 we don't print the columns at all if the column was 0.
So mostly we get:
In file included from /usr/include/c++/4.9.1/iostream:39,
from test.cxx:1:
The code looks like:
const char *line_col = maybe_line_and_column (s.line, col);
static const char *const msgs[] =
{
NULL,
N_(" from"),
N_("In file included from"), /* 2 */
N_(" included from"),
N_("In module"), /* 4 */
N_("of module"),
N_("In module imported at"), /* 6 */
N_("imported at"),
};
unsigned index = (was_module ? 6 : is_module ? 4
: need_inc ? 2 : 0) + !first;
pp_verbatim (context->printer, "%s%s %r%s%s%R",
first ? "" : was_module ? ", " : ",\n",
_(msgs[index]),
"locus", s.file, line_col);
Where maybe_line_and_column does:
static const char *
maybe_line_and_column (int line, int col)
{
static char result[32];
if (line)
{
size_t l
= snprintf (result, sizeof (result),
col >= 0 ? ":%d:%d" : ":%d", line, col);
gcc_checking_assert (l < sizeof (result));
}
else
result[0] = 0;
return result;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-09-02 2:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-42014-4@http.gcc.gnu.org/bugzilla/>
2013-05-10 6:58 ` [Bug preprocessor/42014] Inconsistent column number display for "In file incuded from" skannan at redhat dot com
2014-10-28 15:39 ` vreeland.justin at gmail dot com
2021-09-02 2:53 ` pinskia at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).