The cpp manual page's description of the -MD option is incorrect. It would be correct as a description of gcc's -MD option... indeed it is phrased in terms of "if -MD is used in conjunction with -E" and "the driver", neither of which makes sense when running cpp directly.
As far as I can tell, when running "cpp" the "without -E" semantics always apply: if -o is given then its filename is used but with a ".d" suffix substituted; otherwise, the same substitution is done but on the input filename. In other words, "-o" never directly specifies the dependency output file, whether or not "-E" is on the command line (unlike when running gcc).
I'm happy in principle to produce a patch... but haven't quite got my head around how the man pages are generated (from the texinfo?).
(In reply to Stephen Kell from comment #0)
> I'm happy in principle to produce a patch... but haven't quite got my head
> around how the man pages are generated (from the texinfo?).
Yes, via .pod files. See the %.pod and doc/%.1 targets in gcc/Makefile.in
Created attachment 47405 [details]
Patch to cpp manual page's description of -MD
It took me long enough, but I'm fairly sure this patch results in a less-wrong cpp man page than the current one.
Thanks! As per https://gcc.gnu.org/contribute.html#patches patches should be sent to the mailing list for review. They get missed/ignored when attached to bugzilla. If this is your first patch for GCC it's probably small enough to not need a copyright assignment, although you might want to complete one anyway, see https://gcc.gnu.org/contribute.html#legal