Re: RFC: Bug in specs processing

2008-07-24 Thread Mark Mitchell
Andrew Pinski wrote: gcc -c -ohw.o hw.c This is http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11810 . There was a patch posted here: Thanks for the information. In looking at this further, I think I've found a simple way to solve the problem. In particular, we already have a macro SWITCH

Re: RFC: Bug in specs processing

2008-07-22 Thread Joe Buck
On Tue, Jul 22, 2008 at 04:53:19PM -0700, Mark Mitchell wrote: > I noticed today that: > > gcc -c -o hw.o hw.c > > removes hw.o if failure occurs during the compilation, but: > > gcc -c -ohw.o hw.c > > does not. Hmm. About 20 years of gcc use, and this is the first time I learned that the

Re: RFC: Bug in specs processing

2008-07-22 Thread Andrew Pinski
On Tue, Jul 22, 2008 at 4:53 PM, Mark Mitchell <[EMAIL PROTECTED]> wrote: > I noticed today that: > > gcc -c -o hw.o hw.c > > removes hw.o if failure occurs during the compilation, but: > > gcc -c -ohw.o hw.c > > does not. > > The reason turns out to be that, in the latter case, we record the nam

RFC: Bug in specs processing

2008-07-22 Thread Mark Mitchell
I noticed today that: gcc -c -o hw.o hw.c removes hw.o if failure occurs during the compilation, but: gcc -c -ohw.o hw.c does not. The reason turns out to be that, in the latter case, we record the name "-ohw.o" as a temporary file, rather than "hw.o". Our confusion comes from the hand