[PATCH 6/9] loongarch: Add __BEGIN_DECLS/__END_DECLS to fpu_control.h
Carlos O'Donell
carlos@redhat.com
Mon Nov 2 17:00:09 GMT 2026
On 10/21/26 9:54 AM, Adhemerval Zanella wrote:
> The __loongarch_fpu_getcw and __loongarch_fpu_setcw prototypes have C++
> language linkage when <fpu_control.h> is included from C++.
>
> Checked with the math installed-header tests on loongarch64-linux-gnuf64
> and loongarch32-linux-gnuf64.
LGTM.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
> ---
> sysdeps/loongarch/fpu_control.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/sysdeps/loongarch/fpu_control.h b/sysdeps/loongarch/fpu_control.h
> index 4d9dd52fcab..6ca23438abc 100644
> --- a/sysdeps/loongarch/fpu_control.h
> +++ b/sysdeps/loongarch/fpu_control.h
> @@ -88,6 +88,8 @@ extern fpu_control_t __fpu_control;
> /* Type of the control word. */
> typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__SI__)));
>
> +__BEGIN_DECLS
> +
> /* Macros for accessing the hardware control word. */
> extern fpu_control_t __loongarch_fpu_getcw (void) __THROW;
> extern void __loongarch_fpu_setcw (fpu_control_t) __THROW;
> @@ -106,6 +108,8 @@ extern void __loongarch_fpu_setcw (fpu_control_t) __THROW;
> /* Default control word set at startup. */
> extern fpu_control_t __fpu_control;
>
> +__END_DECLS
> +
> # define _FCLASS_SNAN (1 << 0)
> # define _FCLASS_QNAN (1 << 1)
> # define _FCLASS_MINF (1 << 2)
--
Cheers,
Carlos.
More information about the Libc-alpha
mailing list