This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix -save-temps from clobbering input file@apple.com
On Wed, Oct 31, 2001 at 12:58:10AM +0100, degger@fhm.edu wrote:
> On 30 Oct, Ira Ruben wrote:
>
> > But that isn't the issue. IMO, the compiler never has a "right" to
> > implicitly clobber user files.
>
> I tend to disagree here. The user should be grown up enough to decide
> what the computer should do and what not. You could argue the same about
> object files, they're also implicitely clobbered by gcc when using the
> -c switch but that's exactly what one expects. When I use -save-temps
> (which in fact I do very often to check the produced assembly) then
> I know that it'll wipe away all .i, .s, and .ii files and if I need them
> (for example to produce diffs) I have to back them up. I would find it
> quite disgusting to notice that gcc -save-temps doesn't overwrite .s
> files because they are already existant from the last run....
That's not what Ira's patch addresses, if I understand correctly. He
was preprocessing a .s file and -save-temps was writing out a .s file
with the same name as the specified input file. The string comparison
he adds is case sensitive, and against the specified -input- file.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer