This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Still a problem with debug output, with functions with #line in the middle, on mainline


> > > +       {
> > >           main_input_filename = new_map->to_file;
> > > +         (*debug_hooks->start_source_file) (lineno, new_map->to_file);
> > > +       }
> > >         else
> > >         {
> > >           lineno = SOURCE_LINE (new_map - 1, new_map->from_line - 1);
> > 
> > If this is the correct fix, that new line is common to the if and the
> > else, so it could go after the if / else construct I think, removing
> > it from the else.
> Yup.

I think we also need to hoist this line

> > >           lineno = SOURCE_LINE (new_map - 1, new_map->from_line - 1);

above the if, so that lineno always agrees with the map.

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]