[RFC/RFA] Wrong documentation for "&&var"?
Joel Brobecker
brobecker@adacore.com
Fri Jan 11 19:44:00 GMT 2008
> > The original text was there since the first version in CVS (in 1999),
> > so I'm inclined to think it's a bug in the parser.
>
> >From what I know about parsing C, I suggest we go with the
> documentation change. && is a single token, and && NAME is not
> currently valid. It would introduce some ambiguities into the
> grammer, I suspect.
So Eli, do you agree with the documentation change? We can always
redocument this later if we manage to make it work... Let me resend
the patch:
2008-01-08 Paul Hilfinger <hilfinger@adacore.com>
* gdb.texinfo (C Operators): Remove incorrect parenthetical comment
about &&var, which is rejected by the expression parser.
Thanks,
--
Joel
-------------- next part --------------
Index: gdb.texinfo
===================================================================
--- gdb.texinfo (revision 89)
+++ gdb.texinfo (revision 90)
@@ -9250,7 +9250,7 @@ Address operator. Defined on variables.
For debugging C@t{++}, @value{GDBN} implements a use of @samp{&} beyond what is
allowed in the C@t{++} language itself: you can use @samp{&(&@var{ref})}
-(or, if you prefer, simply @samp{&&@var{ref}}) to examine the address
+to examine the address
where a C@t{++} reference variable (declared with @samp{&@var{ref}}) is
stored.
More information about the Gdb-patches
mailing list