This is the mail archive of the gcc-patches@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: [PATCH] Fix cpp ICE (regression from 2.95.x or 3.0.4)


On Fri, May 03, 2002 at 12:54:51PM +0100, Neil Booth wrote:
> Jakub Jelinek wrote:-
> 
> > > In the absence of testcases (I know it's hard) having it all fully documented
> > > is the best way to avoid regressions.
> > 
> > Actually, I've posted testcases for this, unfortunately they revealed yet
> > another bug (f = fopen("f", "w"); write to f; g = fopen("f", "w"); write something
> > else to g; fclose(g); fclose(f)) and I haven't heard from Zack nor anybody else
> > on the fix yet.
> 
> This is special-cased for stdout; a more general fix would be nice.
> I've not got any great ideas though.

I think I see how to deal with it; I'll be experimenting today.  The
basic idea is, cpplib's caller should be responsible for opening and
closing the output file; all the code in cppoutput etc that needs to
write to a FILE* should take it as a parameter.

This is broken in 3.0 as well as 3.1, right?

zw


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