[Bug c++/42014] New: Inconsistant column number display for "In file incuded from"

View: New views
3 Messages — Rating Filter:   Alert me  

[Bug c++/42014] New: Inconsistant column number display for "In file incuded from"

by Bugzilla from gcc-bugzilla@gcc.gnu.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

In file included from a.h:3:0,
                 from c.cpp:2:

Notice there's a 0 on the first line, and no column number on the second line.
This affects any inflexible error parsing program.
In gcc/diagnostic.c line 245 there's a check for flag_show_column for the first
error line but no check for the rest.
        {
          map = INCLUDED_FROM (line_table, map);
          if (flag_show_column)
            pp_verbatim (context->printer,
                         "In file included from %s:%d:%d",
                         map->to_file,
                         LAST_SOURCE_LINE (map), LAST_SOURCE_COLUMN (map));
          else
            pp_verbatim (context->printer,
                         "In file included from %s:%d",
                         map->to_file, LAST_SOURCE_LINE (map));
          while (! MAIN_FILE_P (map))
            {
              map = INCLUDED_FROM (line_table, map);
              pp_verbatim (context->printer,
                           ",\n                 from %s:%d",
                           map->to_file, LAST_SOURCE_LINE (map));
            }
          pp_verbatim (context->printer, ":");
          pp_newline (context->printer);
        }


--
           Summary: Inconsistant column number display for "In file incuded
                    from"
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: indy2718 at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42014


[Bug other/42014] Inconsistant column number display for "In file incuded from"

by Bugzilla from gcc-bugzilla@gcc.gnu.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



------- Comment #1 from pinskia at gcc dot gnu dot org  2009-11-12 04:47 -------
>This affects any inflexible error parsing program.

Considering flag_show_column controls the display of column info, it does not
say always display it, only when aviable.


--

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c++                         |other


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42014


[Bug other/42014] Inconsistant column number display for "In file incuded from"

by Bugzilla from gcc-bugzilla@gcc.gnu.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



------- Comment #2 from indy2718 at gmail dot com  2009-11-12 05:14 -------
(In reply to comment #1)
> >This affects any inflexible error parsing program.
>
> Considering flag_show_column controls the display of column info, it does not
> say always display it, only when aviable.
>
Should be consistent though.  Possibly remove the flag_show_column block or add
another pp_verbatim LAST_SOURCE_COLUMN in the while loop.


--


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42014