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
- To: degger at fhm dot edu
- Subject: Re: [PATCH] Fix -save-temps from clobbering input file@apple.com
- From: Stan Shebs <shebs at apple dot com>
- Date: Tue, 30 Oct 2001 05:16:49 -0800
- CC: ira at apple dot com, gcc-patches at gcc dot gnu dot org
- References: <20011029232559.C80F87BDF@Nicole.fhm.edu>
degger@fhm.edu wrote:
>
> On 29 Oct, Ira Ruben wrote:
>
> > There is the possibility that the user's input file can be clobbered
> > by the compiler's intermediate files when -save-temps is used.
> > For example gcc -save-temps foo.s will cause the preprocessed
> > output of foo.s to overwrite foo.s. This patch corrects that
> > by checking for such cases and using a temp file instead.
>
> Just my $.02, but why do you have .s files not meant to be overwritten
> in you dirs? I'm using -save-temps regurlary and I learnt quickly not
> to use the .s but .S as suffix for self-written or enriched assembly
> code to distinguish them.
Won't help you on a Mac, where foo.s and foo.S refer to the same
file usually.
Stan