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: assembler skipping \ chars


On Sun, May 27, 2007 at 06:30:01PM +0100, Nathan Sidwell wrote:
> The assembler skips \ chars if they appear in certain positions of the 
> input file :(
> 
> This is occurring in do_scrub_chars, where we fill an input buffer (usually 
> 32768 chars at a time).  In some states we'll emit ' \' instead of '\'. 
> Unfortunately, if we're at the end of the input buffer, the PUT (' ') 
> causes us to exit do_scrub_chars, without saving the '\' character.
> 
> This patch changes do_scrub_chars to check whether we're near the end of 
> the input buffer before trying to emit the ' \' sequence.  If we are, we 
> UNGET the '\' and exit immediately.
> 
> Our user had the unfortunate case where a macro was appearing near the end 
> of an input chunk such that an arg use triggered this bug, leading to 
> confusing error messages.
> 
> ok?

Can you add a testcase?

H.J.


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