[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 19/40] linux-user/main: Suppress out-of-range comparison warni
From: |
Alex Bennée |
Subject: |
[PATCH v2 19/40] linux-user/main: Suppress out-of-range comparison warning for clang |
Date: |
Fri, 5 Jul 2024 09:40:26 +0100 |
From: Richard Henderson <richard.henderson@linaro.org>
For arm32 host and arm64 guest we get
.../main.c:851:32: error: result of comparison of constant 70368744177664 with
expression of type 'unsigned long' is always false
[-Werror,-Wtautological-constant-out-of-range-compare]
if (TASK_UNMAPPED_BASE < reserved_va) {
~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~
We already disable -Wtype-limits here, for this exact comparison, but
that is not enough for clang. Disable -Wtautological-compare as well,
which is a superset. GCC ignores the unknown warning flag.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-Id: <20240630190050.160642-15-richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
linux-user/main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/linux-user/main.c b/linux-user/main.c
index 94c99a1366..7d3cf45fa9 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -843,6 +843,7 @@ int main(int argc, char **argv, char **envp)
*/
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wtype-limits"
+#pragma GCC diagnostic ignored "-Wtautological-compare"
/*
* Select an initial value for task_unmapped_base that is in range.
--
2.39.2
- [PATCH v2 28/40] plugins: Free CPUPluginState before destroying vCPU state, (continued)
- [PATCH v2 28/40] plugins: Free CPUPluginState before destroying vCPU state, Alex Bennée, 2024/07/05
- [PATCH v2 30/40] gdbstub: Clean up process_string_cmd, Alex Bennée, 2024/07/05
- [PATCH v2 16/40] tests/tcg/arm: Manually register allocate half-precision numbers, Alex Bennée, 2024/07/05
- [PATCH v2 39/40] gdbstub: Add support for MTE in user mode, Alex Bennée, 2024/07/05
- [PATCH v2 37/40] gdbstub: Pass CPU context to command handler, Alex Bennée, 2024/07/05
- [PATCH v2 35/40] target/arm: Factor out code for setting MTE TCF0 field, Alex Bennée, 2024/07/05
- [PATCH v2 25/40] plugins/lockstep: mention the one-insn-per-tb option, Alex Bennée, 2024/07/05
- [PATCH v2 19/40] linux-user/main: Suppress out-of-range comparison warning for clang,
Alex Bennée <=
- [PATCH v2 34/40] target/arm: Make some MTE helpers widely available, Alex Bennée, 2024/07/05
- [PATCH v2 32/40] gdbstub: Add support for target-specific stubs, Alex Bennée, 2024/07/05
- [PATCH v2 26/40] plugins/lockstep: clean-up output, Alex Bennée, 2024/07/05
- [PATCH v2 24/40] plugins/lockstep: make mixed-mode safe, Alex Bennée, 2024/07/05
- [PATCH v2 14/40] tests/tcg/arm: Drop -N from LDFLAGS, Alex Bennée, 2024/07/05
- [PATCH v2 36/40] gdbstub: Make hex conversion function non-internal, Alex Bennée, 2024/07/05
- [PATCH v2 21/40] test/plugin: make insn plugin less noisy by default, Alex Bennée, 2024/07/05
- [PATCH v2 13/40] tests/tcg/arm: Fix fcvt result messages, Alex Bennée, 2024/07/05
- [PATCH v2 38/40] gdbstub: Use true to set cmd_startswith, Alex Bennée, 2024/07/05