diff mbox series

[3/3] accel/tcg: Remove special case for GCC < 4.6

Message ID 20200928125859.734287-4-philmd@redhat.com
State Accepted
Commit 19a84318c674c157f1b04c5c99595379f8ac8bb3
Headers show
Series qemu/compiler: Remove unused special case code for GCC < 4.8 | expand

Commit Message

Philippe Mathieu-Daudé Sept. 28, 2020, 12:58 p.m. UTC
Since commit efc6c070aca ("configure: Add a test for the
minimum compiler version") the minimum compiler version
required for GCC is 4.8.

We can safely remove the special case for GCC 4.6 introduced
in commit 0448f5f8b81 ("cpu-exec: Fix compiler warning
(-Werror=clobbered)").
No change for Clang as we don't know.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 accel/tcg/cpu-exec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Peter Maydell Sept. 28, 2020, 1:52 p.m. UTC | #1
On Mon, 28 Sep 2020 at 14:40, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>

> Since commit efc6c070aca ("configure: Add a test for the

> minimum compiler version") the minimum compiler version

> required for GCC is 4.8.

>

> We can safely remove the special case for GCC 4.6 introduced

> in commit 0448f5f8b81 ("cpu-exec: Fix compiler warning

> (-Werror=clobbered)").

> No change for Clang as we don't know.


Looking through the git history the inclusion of "clang" in
this workaround is because a bug was noticed with the FreeBSD
clang which prompted commit 6c78f29a2424622bfc9c3 in 2013.
It's quite tempting to assume newer clangs have fixed this,
but still I guess it's safest to leave the workaround in place...

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>


thanks
-- PMM
diff mbox series

Patch

diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
index e10b46283cc..bf149bb824e 100644
--- a/accel/tcg/cpu-exec.c
+++ b/accel/tcg/cpu-exec.c
@@ -703,7 +703,7 @@  int cpu_exec(CPUState *cpu)
 
     /* prepare setjmp context for exception handling */
     if (sigsetjmp(cpu->jmp_env, 0) != 0) {
-#if defined(__clang__) || !QEMU_GNUC_PREREQ(4, 6)
+#if defined(__clang__)
         /* Some compilers wrongly smash all local variables after
          * siglongjmp. There were bug reports for gcc 4.5.0 and clang.
          * Reload essential local variables here for those compilers.