diff mbox series

doc: Fix docs for -dD regarding predefined macros

Message ID 20240305161659.332828-1-jwakely@redhat.com
State New
Headers show
Series doc: Fix docs for -dD regarding predefined macros | expand

Commit Message

Jonathan Wakely March 5, 2024, 4:16 p.m. UTC
OK for trunk?

Or am I missing something and the docs are right? (sometimes? always?)


-- >8 --

The manual has always claimed that -dD differs from -dM by not
outputting predefined macros, but that's untrue. It has been untrue
since at least GCC 3.2 and probably even older.

gcc/ChangeLog:

	* doc/cppopts.texi: Remove incorrect claim about -dD not
	outputting predefined macros.
---
 gcc/doc/cppopts.texi | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Jakub Jelinek March 5, 2024, 5:26 p.m. UTC | #1
On Tue, Mar 05, 2024 at 04:16:00PM +0000, Jonathan Wakely wrote:
> OK for trunk?
> 
> Or am I missing something and the docs are right? (sometimes? always?)
> 
> 
> -- >8 --
> 
> The manual has always claimed that -dD differs from -dM by not
> outputting predefined macros, but that's untrue. It has been untrue
> since at least GCC 3.2 and probably even older.
> 
> gcc/ChangeLog:
> 
> 	* doc/cppopts.texi: Remove incorrect claim about -dD not
> 	outputting predefined macros.

LGTM.

I can't bisect that far, supposedly predefined macros weren't included back
in 1996 when this was written but maybe it changed in 1999 or even earlier.

	Jakub
Joseph Myers March 5, 2024, 6:31 p.m. UTC | #2
On Tue, 5 Mar 2024, Jakub Jelinek wrote:

> I can't bisect that far, supposedly predefined macros weren't included back
> in 1996 when this was written but maybe it changed in 1999 or even earlier.

It looks like this changed in 3.0 (so probably with the move to cpplib to 
provide the default preprocessor implementation), but I don't know why.
Jonathan Wakely March 5, 2024, 7:33 p.m. UTC | #3
On Tue, 5 Mar 2024 at 18:31, Joseph Myers wrote:
>
> On Tue, 5 Mar 2024, Jakub Jelinek wrote:
>
> > I can't bisect that far, supposedly predefined macros weren't included back
> > in 1996 when this was written but maybe it changed in 1999 or even earlier.
>
> It looks like this changed in 3.0 (so probably with the move to cpplib to
> provide the default preprocessor implementation), but I don't know why.


Ah, thanks for narrowing it down.

I'll push the doc change tomorrow.
diff mbox series

Patch

diff --git a/gcc/doc/cppopts.texi b/gcc/doc/cppopts.texi
index fa8f3d88c89..5b5b0848ae8 100644
--- a/gcc/doc/cppopts.texi
+++ b/gcc/doc/cppopts.texi
@@ -524,8 +524,7 @@  interpreted as a synonym for @option{-fdump-rtl-mach}.
 
 @opindex dD
 @item -dD
-Like @option{-dM} except in two respects: it does @emph{not} include the
-predefined macros, and it outputs @emph{both} the @samp{#define}
+Like @option{-dM} except that it outputs @emph{both} the @samp{#define}
 directives and the result of preprocessing.  Both kinds of output go to
 the standard output file.