diff options
author | Jan Beulich <jbeulich@suse.com> | 2023-07-28 12:34:30 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2023-07-28 12:34:30 +0200 |
commit | 95b83567a4500c9cc14480dc171cf1d26a1555a6 (patch) | |
tree | e9a22565fba15fbc4b43686b3cc602773fc3edca /gas/read.c | |
parent | 29c108c9610640439daa5244a573348b7c47d994 (diff) | |
download | fsf-binutils-gdb-95b83567a4500c9cc14480dc171cf1d26a1555a6.zip fsf-binutils-gdb-95b83567a4500c9cc14480dc171cf1d26a1555a6.tar.gz fsf-binutils-gdb-95b83567a4500c9cc14480dc171cf1d26a1555a6.tar.bz2 |
gas: amend X_unsigned uses
PR gas/30688
X_unsigned being clear does not indicate a negative number; it merely
indicates a signed one (whose sign may still be clear). Amend two uses
by an actual value check.
Diffstat (limited to 'gas/read.c')
-rw-r--r-- | gas/read.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1751,7 +1751,7 @@ s_comm_internal (int param, ignore_rest_of_line (); goto out; } - else if (temp != size || !exp.X_unsigned) + else if (temp != size || (!exp.X_unsigned && exp.X_add_number < 0)) { as_warn (_("size (%ld) out of range, ignored"), (long) temp); ignore_rest_of_line (); @@ -2541,7 +2541,7 @@ parse_align (int align_bytes) if (exp.X_op == O_absent) goto no_align; - if (!exp.X_unsigned) + if (!exp.X_unsigned && exp.X_add_number < 0) { as_warn (_("alignment negative; 0 assumed")); align = 0; |