diff options
author | Alan Modra <amodra@gmail.com> | 2025-01-09 15:07:49 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2025-01-09 15:23:21 +1030 |
commit | e0a07d7fc564d91ed24d916dc7125d7159388580 (patch) | |
tree | 5110658ce1bd8a778834ab20bed8e17f12a4719c | |
parent | 87199294875e0e9cb484038f89a16417d0cd2081 (diff) | |
download | binutils-e0a07d7fc564d91ed24d916dc7125d7159388580.zip binutils-e0a07d7fc564d91ed24d916dc7125d7159388580.tar.gz binutils-e0a07d7fc564d91ed24d916dc7125d7159388580.tar.bz2 |
Excessive gas .irpt count
There is a test in do_repeat to error on "negative" repeat counts.
Just at what value a ssize_t is negative of course depends on the
host. Change the excessive repeat count to a fixed value, 0x80000000,
ie. what would be seen as negative on a 32-bit host.
-rw-r--r-- | gas/read.c | 4 | ||||
-rw-r--r-- | gas/testsuite/gas/macros/end.l | 2 |
2 files changed, 3 insertions, 3 deletions
@@ -3144,9 +3144,9 @@ do_repeat (size_t count, const char *start, const char *end, sb one; sb many; - if (((ssize_t) count) < 0) + if (count > 0x7fffffff) { - as_bad (_("negative count for %s - ignored"), start); + as_bad (_("excessive count %zu for %s - ignored"), count, start); count = 0; } diff --git a/gas/testsuite/gas/macros/end.l b/gas/testsuite/gas/macros/end.l index ff5d452..9e765cc 100644 --- a/gas/testsuite/gas/macros/end.l +++ b/gas/testsuite/gas/macros/end.l @@ -1,4 +1,4 @@ .*: Assembler messages: .*:1: Warning: \.endm .* \.macro .*:2: Warning: \.endr .* (\.rept|\.irpc?).*(\.rept|\.irpc?).*(\.rept|\.irpc?) -.*:3: Error: negative count for REPT - ignored +.*:3: Error: .* for REPT - ignored |