Re: [Qemu-devel] [PATCH v3] cpu-exec: Fix compiler warning (-Werror=clobbered)

2015-09-26 Thread Dimitry Andric
On 26 Sep 2015, at 13:23, Stefan Weil wrote: > > Reloading of local variables after sigsetjmp is only needed for some > buggy compilers. I don't think the compilers are buggy; any non-volatile local variable that is changed between setjmp() and longjmp() is indeterminate. Quoting C99 7.13.2.1:

Re: [Qemu-devel] [PATCH v3] cpu-exec: Fix compiler warning (-Werror=clobbered)

2015-09-26 Thread Peter Maydell
On 26 September 2015 at 08:33, Dimitry Andric wrote: > On 26 Sep 2015, at 13:23, Stefan Weil wrote: >> >> Reloading of local variables after sigsetjmp is only needed for some >> buggy compilers. > > I don't think the compilers are buggy; any non-volatile local variable that > is changed between

[Qemu-devel] [PATCH v3] cpu-exec: Fix compiler warning (-Werror=clobbered)

2015-09-26 Thread Stefan Weil
Reloading of local variables after sigsetjmp is only needed for some buggy compilers. The code which should reload these variables causes compiler warnings with gcc 4.7 when compiler optimizations are enabled: cpu-exec.c:204:15: error: variable ‘cpu’ might be clobbered by ‘longjmp’ or ‘vfork’ [-