From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stan Shebs To: Neil Booth Cc: Zack Weinberg , joseph@daikokuya.demon.co.uk, gcc@gcc.gnu.org Subject: Re: Best way to remove cpp0 Date: Fri, 12 Oct 2001 15:01:00 -0000 Message-id: <3BC76795.34CF262E@apple.com> References: <20011012223509.A30940@daikokuya.demon.co.uk> X-SW-Source: 2001-10/msg00778.html Neil Booth wrote: > > However, if there's a bug in the compiler during 2), say a segfault, > then the preprocessed output with -save-temps would only proceed as > far as the compiler bug. We have asked users to submit the > preprocessed output obtained with -save-temps. > > What's the best way forwards for this case? How much overhead would it be to buffer all the way to the end of a file, and write out before proceeding to compilation proper? When a segfault occurs, things are going to be pretty scrambled, you'll want your tokens safe on disk. Or you could have -save-temps read ahead by a half-million tokens or so, then dump before proceeding into compilation proper. You can prevent bloat (although -save-temps is something you use when you're desperate to debug and not caring much about size/speed), but still most .i files will be complete and well-formed. Stan