]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gas/expr.c
gas: correct ignoring of C-style number suffixes
authorJan Beulich <jbeulich@suse.com>
Fri, 3 Nov 2023 12:33:38 +0000 (13:33 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 3 Nov 2023 12:33:38 +0000 (13:33 +0100)
commit88bfe6ac8bcbaf1eb0c1e4be02c21a5c048b7335
treeedca1c070104d5998bc14a0ab320379aaa0393ab
parentc76820a017db5f7267d3e86851af41dd8adcbebf
gas: correct ignoring of C-style number suffixes

First of all the respective original changes didn't deal with just 0
having such a suffix - this needs additional logic outside of
integer_constant(). Further bogus suffixes having more than two L-s
were accepted, while valid suffixes with U following the L(s) weren't.
Finally respective tests were introduced for Sparc only.

Reviewed-by: Neal Frager <neal.frager@amd.com>
gas/expr.c
gas/testsuite/gas/all/const-1.l [new file with mode: 0644]
gas/testsuite/gas/all/const-1.s [new file with mode: 0644]
gas/testsuite/gas/all/gas.exp