This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gas/expr.c: 0b vs 0b0 vs 00b


On Wed, Aug 12, 2015 at 06:05:50PM -0400, DJ Delorie wrote:
> 
> > Actually 1b is a backward reference too.  I think both 0b and 1b
> > without following binary digits ought to be treated as backward refs
> > on these targets, since if you want to write a binary 0 or 1 with an
> > explicit suffix that can be done as 0B or 1B.
> 
> Note that the gas docs are vague about this: one spot says local refs
> are '1' through '9', another refers to the "first ten single-digit..."
> 
> But yeah, I was only trying to special-case the 0b[01]+ case.
> 
> > Here's a patch that extends yours a little.  What do you think?
> 
> Seems OK to me.

OK, committing along with this doc fix.

	* doc/as.texinfo (Local Labels): Allowed range of N in local
	labels is non-negative integers, not positive integers.

diff --git a/gas/doc/as.texinfo b/gas/doc/as.texinfo
index dae7424..c2f2f86 100644
--- a/gas/doc/as.texinfo
+++ b/gas/doc/as.texinfo
@@ -3707,11 +3707,11 @@ Local labels are different from local symbols.  Local labels help compilers and
 programmers use names temporarily.  They create symbols which are guaranteed to
 be unique over the entire scope of the input source code and which can be
 referred to by a simple notation.  To define a local label, write a label of
-the form @samp{@b{N}:} (where @b{N} represents any positive integer).  To refer
-to the most recent previous definition of that label write @samp{@b{N}b}, using
-the same number as when you defined the label.  To refer to the next definition
-of a local label, write @samp{@b{N}f}---the @samp{b} stands for ``backwards''
-and the @samp{f} stands for ``forwards''.
+the form @samp{@b{N}:} (where @b{N} represents any non-negative integer).
+To refer to the most recent previous definition of that label write
+@samp{@b{N}b}, using the same number as when you defined the label.  To refer
+to the next definition of a local label, write @samp{@b{N}f}.  The @samp{b}
+stands for ``backwards'' and the @samp{f} stands for ``forwards''.
 
 There is no restriction on how you can use these labels, and you can reuse them
 too.  So that it is possible to repeatedly define the same local label (using

-- 
Alan Modra
Australia Development Lab, IBM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]