This is the mail archive of the 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]

Re: gas bug report

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.


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