[gas] fix expression crash

Nathan Sidwell nathan@codesourcery.com
Tue May 4 14:41:00 GMT 2010


This patch fixes a confusing error message and a crash.  If the user gives a 
string argument where a numeric one is expected, things go badly wrong (for 
instance confusing .byte and .ascii).

	.byte " "
[One space] gives:
foo.S:1: Error: bad expression
foo.S:1: Error: junk at end of line, first unrecognized character is `"'

	.byte "  "

[Two spaces] gives:
foo.S:1: Error: bad expression
foo.S:1: Internal error!

this fixes things to give:
'unexpected `"' in expression'

tested on arm-eabi, ok?

nathan

-- 
Nathan Sidwell    ::   http://www.codesourcery.com   ::         CodeSourcery

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: all2.diff
URL: <https://sourceware.org/pipermail/binutils/attachments/20100504/eeebc279/attachment.ksh>


More information about the Binutils mailing list