This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -MD together with -save-temps broken
Am Don, 2002-03-14 um 08.23 schrieb Neil Booth:
> > Well, I will find a workaround but it would be nice if this undocumented
> > behaviour could either be fixed and documented or be removed with the
> > conventinional standard error for unknown switches.
> Existing behaviour is fully documented. Please let me know what you
> think is not documented.
-MD still appears to work in cpp (existing behaviour) but is not
documented in `cpp --help -v`.
It seems that cppopts.texi and the cpp seem to differ when it comes
to validity of the option:
-------------------------------------------------------------------
@item -MD
@opindex MD
@option{-MD} is equivalent to @option{-M -MF @var{file}}, except that
@option{-E} is not implied. The driver determines @var{file} based on
whether an @option{-o} option is given. If it is, the driver uses its
argument but with a suffix of @file{.d}, otherwise it take the
basename of the input file and applies a @file{.d} suffix.
-------------------------------------------------------------------
According to this snipped -MD is legal and supposed to work.
I would suggest removing this part of the documentation and issue a
warning if a user tries to use this deprecated option.
The alternative would be to mention -MD in cpps help again and fix
the racial behaviour with -save-temps.
BTW: I just checked. -M -MF is NOT producing the same behaviour as
-MD because it does not produce any compiled output at all and it
appears that I cannot enable the -E switch.
--
Servus,
Daniel