Bug 91025 - cpp man page incorrectly describes -MD option
Summary: cpp man page incorrectly describes -MD option
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: preprocessor (show other bugs)
Version: 7.4.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: documentation
Depends on:
Blocks:
 
Reported: 2019-06-27 15:24 UTC by Stephen Kell
Modified: 2019-12-03 09:32 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2019-12-03 00:00:00


Attachments
Patch to cpp manual page's description of -MD (495 bytes, patch)
2019-12-02 18:07 UTC, Stephen Kell
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen Kell 2019-06-27 15:24:16 UTC
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?).
Comment 1 Jonathan Wakely 2019-06-27 20:04:28 UTC
(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
Comment 2 Stephen Kell 2019-12-02 18:07:54 UTC
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.
Comment 3 Jonathan Wakely 2019-12-03 09:32:02 UTC
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 

Thanks again.