gas bug report

Nick Clifton nickc@cambridge.redhat.com
Tue Sep 18 04:52:00 GMT 2001


Hi Ben,

> Error reporting for local labels is a little bit sketchy.  Here is a
> test case that demonstrates one problem:
> 
> foo:
> 	# should produce an error
> 	call 0f
> 
> 	# should produce an error (and does)
> 	# if you uncomment the insn below, the first error disappears.
> 	# call 1b
> 
> The first "call" instruction (in isolation) produces the correct error
> message, but in the presence of the second "call" instruction, the
> first error message is lost and replaced with the second.  Shouldn't
> both be reported?

Well yes and no.  You see the problem is that the absence of local
label 0: is easy to detect (and report) when a backward reference is
encountered but has to be postponed when a forward reference is
encountered.  In fact the forward reference is only resolved when the
assembler attempts to write out the object file.  However the presence
of an error during the parsing phase of the assembly prevents the
assembler from attempting to write out the object file and so it never
discovers the second, unresolved reference.

Cheers
        Nick




More information about the Binutils mailing list