This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: c++filt lossage to gcj 4.0.x


Nick Clifton writes:

 > > This patch:
 > 
 > > removed a critical fflush() from c++filt.  As a result gcj 4.0.x no
 > > longer works on any system with current binutils.
 > 
 > Fascinating.
 > 
 > > This patch restores the previous binutils behaviour.
 > 
 > > 2005-11-17  Andrew Haley  <aph@redhat.com>
 > > 
 > > 	* cxxfilt.c (main): Flush ouput at newline.
 > 
 > 
 > > Index: cxxfilt.c
 > > ===================================================================
 > > RCS file: /cvs/src/src/binutils/cxxfilt.c,v
 > > retrieving revision 1.10
 > > diff -u -r1.10 cxxfilt.c
 > > --- cxxfilt.c	11 Oct 2005 16:33:16 -0000	1.10
 > > +++ cxxfilt.c	17 Nov 2005 12:29:26 -0000
 > > @@ -278,8 +278,9 @@
 > >        /* Echo the whitespace characters so that the output looks
 > >  	 like the input, only with the mangled names demangled.  */
 > >        putchar (c);
 > > +      if (c == '\n')
 > > +	fflush (stdout);
 > >      }
 > >  
 > > -  fflush (stdout);
 > >    return 0;
 > >  }
 > 
 > Restoring the removed fflush is OK, but I think that you should leave in 
 > the final fflush().  You cannot guarantee that input will terminate with 
 > a line feed character, so a final flush is a good idea.

So what?  All streams get closed at program exit, and close always
flushes all streams.

But hey, I don't care.  :-)

 > Approved with this modification.

Done.

Andrew.


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