* [RFC/RFA] Wrong documentation for "&&var"?
@ 2008-01-08 6:55 Joel Brobecker
2008-01-08 20:31 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Joel Brobecker @ 2008-01-08 6:55 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 584 bytes --]
Hello,
Paul noticed the following.
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.
Not knowing what was really meant at the implementation level, I'm not
sure whether this is a parser implementation bug, or an error in the
documentation. Paul thought that this was an error in the documentation
so, assuming he is correct, I'm submitting this change on his behalf.
So, is this a parser bug or a documentation error?
Thanks,
--
Joel
[-- Attachment #2: formatted-doc.diff --]
[-- Type: text/plain, Size: 546 bytes --]
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC/RFA] Wrong documentation for "&&var"?
2008-01-08 6:55 [RFC/RFA] Wrong documentation for "&&var"? Joel Brobecker
@ 2008-01-08 20:31 ` Eli Zaretskii
2008-01-08 20:41 ` Daniel Jacobowitz
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2008-01-08 20:31 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb-patches
> Date: Mon, 7 Jan 2008 22:55:24 -0800
> From: Joel Brobecker <brobecker@adacore.com>
>
> Paul noticed the following.
>
> 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.
>
> Not knowing what was really meant at the implementation level, I'm not
> sure whether this is a parser implementation bug, or an error in the
> documentation. Paul thought that this was an error in the documentation
> so, assuming he is correct, I'm submitting this change on his behalf.
>
> So, is this a parser bug or a documentation error?
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC/RFA] Wrong documentation for "&&var"?
2008-01-08 20:31 ` Eli Zaretskii
@ 2008-01-08 20:41 ` Daniel Jacobowitz
2008-01-11 19:44 ` Joel Brobecker
0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2008-01-08 20:41 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Joel Brobecker, gdb-patches
On Tue, Jan 08, 2008 at 10:31:31PM +0200, Eli Zaretskii wrote:
> > Not knowing what was really meant at the implementation level, I'm not
> > sure whether this is a parser implementation bug, or an error in the
> > documentation. Paul thought that this was an error in the documentation
> > so, assuming he is correct, I'm submitting this change on his behalf.
> >
> > So, is this a parser bug or a documentation error?
>
> 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.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC/RFA] Wrong documentation for "&&var"?
2008-01-08 20:41 ` Daniel Jacobowitz
@ 2008-01-11 19:44 ` Joel Brobecker
2008-01-11 21:08 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Joel Brobecker @ 2008-01-11 19:44 UTC (permalink / raw)
To: Eli Zaretskii, gdb-patches
[-- Attachment #1: Type: text/plain, Size: 706 bytes --]
> > 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
[-- Attachment #2: formatted-doc.diff --]
[-- Type: text/plain, Size: 546 bytes --]
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC/RFA] Wrong documentation for "&&var"?
2008-01-11 19:44 ` Joel Brobecker
@ 2008-01-11 21:08 ` Eli Zaretskii
2008-01-12 8:38 ` Joel Brobecker
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2008-01-11 21:08 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb-patches
> Date: Fri, 11 Jan 2008 11:43:53 -0800
> From: Joel Brobecker <brobecker@adacore.com>
>
> So Eli, do you agree with the documentation change?
Reluctantly, yes. I think the &(&foo) syntax is really ugly.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC/RFA] Wrong documentation for "&&var"?
2008-01-11 21:08 ` Eli Zaretskii
@ 2008-01-12 8:38 ` Joel Brobecker
0 siblings, 0 replies; 6+ messages in thread
From: Joel Brobecker @ 2008-01-12 8:38 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: gdb-patches
> > So Eli, do you agree with the documentation change?
>
> Reluctantly, yes. I think the &(&foo) syntax is really ugly.
I agree it would have been nice to be able to use &&foo, but
if it makes the grammar ambiguous... Anyway, the documentation
change is now in.
Thanks Eli.
--
Joel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-01-12 8:38 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-08 6:55 [RFC/RFA] Wrong documentation for "&&var"? Joel Brobecker
2008-01-08 20:31 ` Eli Zaretskii
2008-01-08 20:41 ` Daniel Jacobowitz
2008-01-11 19:44 ` Joel Brobecker
2008-01-11 21:08 ` Eli Zaretskii
2008-01-12 8:38 ` Joel Brobecker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox