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: What's the best way to define local labels in an assembler macro?


On Mon, 30 Apr 2012, R. Diez wrote:

> I don't think you've realised the scale of the problem. Let me put it in 
> perspective for you. There are thousands of gas users who try to use the 
> assembler as little as possible and need not become masters at it. There 
> are millions of lines of code written by developers who don't care if 
> you later encounter a label collision. Many people take a quick look at 
> the documentation and not surprisingly decide life is too short to play 
> with the different local label options. Most people hope for the best. 
> Some reserve a number range (less people even document it). Few append $ 
> to the label names. Nobody uses \@ or .altmacro. Too many write horrible 
> multi-line macros for the C pre-processor.

 Documentation for the .macro pseudo-op appears reasonable enough to me 
for one to be able to infer what the implications of using labels within 
macros are.  That does not necessarily mean it's presented in the most 
comprehensible form possible, however...

> I already said I read the manual, I hope it's not different to the info 
> pages (which have a less than ideal user interface). The documentation 
> is not clear about the behaviour of the different options I mentioned. 
> There's no clear advice and few examples. I've googled around and I'm 
> not the only one who found a little time to devote to this question. 
> Users shouldn't have to test several things around in order to learn the 
> best way to declare local labels. I don't wish to try it myself and miss 
> something or make mistakes, I would like an authoritative answer I can 
> rely on.

 ... this project is run by volunteers who do not always have the 
resources or skills to write good documentation.  You are welcome to 
improve it by proposing a change, in the unified diff format, that will 
clarify any ambiguities or address any other deficiencies that you may 
have found in our manuals while experimenting with GAS or any other piece 
of software maintained as a part of this project.  I am sure everybody 
will appreciate your effort as will myself.

  Maciej


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