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]

Re: [CPP patch]: -M default name


On Thu, Feb 08, 2001 at 07:28:03PM +0000, Neil Booth wrote:
> 
> The semantics of -o as regards to interaction between gcc / cpp and
> cpp0 are not entirely clear to me.  At present,
> 
> gcc -M foo.c -o foo.o
> 
> works (apart from truncation of foo.o).  However,
> 
> cpp -M foo.c -o foo.o
> 
> complains about multiple output files.  I'm not entirely sure how to
> fix this (I've not looked to find what's causing it either).

I'm not sure how it does work now, but here's how I think it should
work: if -M[M] and not -MT, turn -o into -MQ.  i.e.

(cpp|gcc) -M foo.c -o foo.o

means

gcc -E -M foo.c -MQ foo.o

> Note the specs change - the specs currently instruct the driver to
> delete the output file in case of an error, which is just as bad as
> truncating it, so I'm removing that.

Um.  No.  If you don't delete the output file, then when you restart
make, it will think the output file is up to date when it isn't.

zw

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