gas:Reject ++ and --

Nathan Sidwell nathan@codesourcery.com
Wed Mar 17 16:23:00 GMT 2004


Hi,
the attached patch causes gas to not interpret ++ and -- as two
+ or - operators in a row.  The current behaviour is to allow
'a ++ b' as if it was 'a + (+b)' and '++ a' as if '+(+a)'.  The problem
I was having was a port which had an addressing mode syntax of the form
	reg++[reg]
and desiring to process this as
	<expr> "++[" <expr> "]"
but the expression evaluator ate the '++' as two '+' operators and
then barfed.

Regardless of those issues, the current '++' and '--' behaviour surprises
at least some programmers (me and my users :)

built and tested on i686-pc-linux-gnu, ok?

nathan
-- 
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ppmm.patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20040317/c7bad6d6/attachment.ksh>


More information about the Binutils mailing list