E.5. Using Labels with Macros

Regular labels throughout an entire program unit submitted to the assembler must be unique, in order that the assembler may refer to data locations or branch targets properly. Remember that regular labels begin with an alphabetic character (Section 3.5.2).

Since much of the utility of macros derives from being able to invoke any macro at multiple points, clearly any hard-coded regular labels defined by multiple expansions of a macro would be considered multiply defined by the assembler.

The temporary labels supported by the GCC assembler offer some ways around this problem of reconciling multiplicity and uniqueness. A given temporary label may occur multiple times in a program, but there is a rule ensuring a unique ...

Get Itanium® Architecture for Programmers: Understanding 64-Bit Processors and EPIC Principles now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.