This is the mail archive of the gcc-bugs@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: gcc -MF doesn't work as expected


Peter Eisentraut wrote:-

> > Maybe I wasn't clear.  The only purpose of -MF is to override the default
> > name of the dependencies output file from what it otherwise would have
> > been.  It doesn't change semantics in any other way; -M and -MD retain
> > their meanings and behaviour.
> 
> That would make sense, too, but in that case the use of -MF should be
> prohibited (or ignored) in absence of -MD.  The combination '-M -MF' is
> non-sensical:  It does not make sense to change the name of an output file
> when no output file is to be written.  (It makes even less sense to
> actually write that output file.)

Sure it makes sense.  Instead of outputting to stdout, -MF means it
outputs to the file you specify.  This has the (intended) advantage
over simple redirection that it frees up stdout, so CPP can use stdout
instead to output the preprocessed source which is otherwise suppressed.
This is conceivably useful.

Neil.


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