gas: Clarify whitespace between a label’s symbol and its colon

Alan Modra amodra@gmail.com
Fri Aug 29 09:13:50 GMT 2025


On Fri, Aug 29, 2025 at 08:51:29AM +0200, Jan Beulich wrote:
> On 29.08.2025 06:50, Fangrui Song wrote:
> >> Whitespace before a label or after a colon is permitted, but you **may not have whitespace between a label’s symbol and its colon**. See Labels.

That used to only be the case in MRI mode.  In fact if you go back far
enough you'll see this comment:
      /* If we're in state 2 or 11, we've seen a non-white character
         followed by whitespace.  If the next character is ':', this
         is whitespace after a label name which we *must* ignore.  */

See commit 7172e2266f4a

> Documentation is (imo) correct; it's the scrubber which is flawed.
> 
> Jan
> 
> [1] https://sourceware.org/git?p=binutils-gdb.git;a=commitdiff;h=6ae8a30d44f016cafb46a75843b5109316eb1996

-- 
Alan Modra


More information about the Binutils mailing list