On Thu, Nov 12, 2026 at 7:18 AM LIU Hao <[email protected]> wrote:
>
> When using the Microsoft C runtime on 32-bit x86 systems, the alignment
> should be 8. Their `malloc()` returns pointers that are only aligned to
> 8 bytes, and their C++-only `max_align_t` is a typedef for `double`.
>
> So exclude `__float128` there, which also matches mingw-w64 headers.
>
> gcc/ChangeLog:
>
>         * ginclude/stddef.h: Exclude `__float128` from `max_align_t` for MinGW
>         targets.
>
> Signed-off-by: LIU Hao <[email protected]>
> ---
>   gcc/ginclude/stddef.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h
> index 454e5e9fc779..048fc66d7be3 100644
> --- a/gcc/ginclude/stddef.h
> +++ b/gcc/ginclude/stddef.h
> @@ -445,7 +445,7 @@ typedef struct {
>        use __float128 here; that is only available on some
>        architectures, but only on i386 is extra alignment needed for
>        __float128.  */

At least update the comment on why mingw32 is excluded.
Shouldn't this be excluded for cygwin too?

> -#ifdef __i386__
> +#if defined(__i386__) && !defined(__MINGW32__)
>     __float128 __max_align_f128 
> __attribute__((__aligned__(__alignof(__float128))));
>   #endif
>   } max_align_t;
> --
> 2.56.1
>

Reply via email to