This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: some ideas to gnu as
- From: Nick Clifton <nickc at redhat dot com>
- To: Miro Kropacek <miro dot kropacek at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Wed, 28 May 2008 15:24:36 +0100
- Subject: Re: some ideas to gnu as
- References: <483C833B.7060203@gmail.com> <483D1686.4000801@redhat.com> <c6533ef60805280142v1ccf6edv89c52f6d6d2bfdfd@mail.gmail.com>
Hi Miro,
Hoho, so I certainly didn't understand it well then! So only difference
is I don't use named labels (which is pity but not that unusable at all)
but 1..9 instead?
Actually any positive integer will work, not just 1..9.
As I see it, it's much error-prone than that named
labels, esp. in some more complicated constructions with 6-7 local
labels...
True, although GAS's implementation does have the advantage that you can
make forward references to local labels as well as backwards references.
So that for example:
foo 1f
1: ; <--- first local label
bar 1b
baz 1f
1: ; <--- second local label
Here both foo and bar refer to the first local label and baz refers to
the second local label. As I understand it from your description of the
local labels that you are used to, you cannot make forward references,
correct ?
but in principle, do you have something against "my" version
of local labels?
In principle no, although stylistically yes. Gas has always treated the
period character (.), when it appears as the first character in a
symbol, as indicating the start of a pseudo-operator. (eg .global,
.word, .text etc). So it would be very confusing if a dot prefix were
used also to introduce a local label. Maybe if you introduced a new
pseudo-operator, eg ".local", and used that instead it would be better. ie:
.local loop
foo
foo
b loop
Cheers
Nick