[PATCH v3] powerpc: Make setjmp/longjmp signature standard

Michael Ellerman patch-notifications at ellerman.id.au
Wed Apr 1 23:53:38 AEDT 2020


On Mon, 2020-03-30 at 08:03:56 UTC, Clement Courbet wrote:
> Declaring setjmp()/longjmp() as taking longs makes the signature
> non-standard, and makes clang complain. In the past, this has been
> worked around by adding -ffreestanding to the compile flags.
> 
> The implementation looks like it only ever propagates the value
> (in longjmp) or sets it to 1 (in setjmp), and we only call longjmp
> with integer parameters.
> 
> This allows removing -ffreestanding from the compilation flags.
> 
> Context:
> https://lore.kernel.org/patchwork/patch/1214060
> https://lore.kernel.org/patchwork/patch/1216174
> 
> Signed-off-by: Clement Courbet <courbet at google.com>
> Reviewed-by: Nathan Chancellor <natechancellor at gmail.com>
> Tested-by: Nathan Chancellor <natechancellor at gmail.com>
> Cc: stable at vger.kernel.org # v4.14+
> Fixes: c9029ef9c957 ("powerpc: Avoid clang warnings around setjmp and longjmp")

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/c17eb4dca5a353a9dbbb8ad6934fe57af7165e91

cheers


More information about the Linuxppc-dev mailing list