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

Daniel Berlin dan@dberlin.org
Wed Jan 30 14:27:00 GMT 2002


On Wed, 30 Jan 2002, Neil Booth wrote:

> Daniel Berlin wrote:-
> 
> > Index: c-lex.c
> > ===================================================================
> > RCS file: /cvs/gcc/egcs/gcc/c-lex.c,v
> > retrieving revision 1.163
> > diff -c -3 -p -w -B -b -r1.163 c-lex.c
> > *** c-lex.c     2001/12/31 04:13:35     1.163
> > --- c-lex.c     2002/01/30 21:25:19
> > *************** cb_file_change (pfile, new_map)
> > *** 265,271 ****
> > --- 265,274 ----
> >         /* Don't stack the main buffer on the input stack;
> >          we already did in compile_file.  */
> >         if (map == NULL)
> > +       {
> >           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.



More information about the Gcc-bugs mailing list