stdatomic.h uses undefined type (___wchar_t)

Jeff Johnston jjohnstn@redhat.com
Tue Jun 9 20:07:46 GMT 2026


I think that is reasonable.  I have pushed a patch.

-- Jeff J.

On Tue, Jun 2, 2026 at 10:25 AM Maxim Solodovnik <solomax666@gmail.com>
wrote:

> Maybe following simple patch can be applied? :)
>
> diff --git a/newlib/libc/include/stdatomic.h
> b/newlib/libc/include/stdatomic.h
> index 67107f47e..40f2d269c 100644
> --- a/newlib/libc/include/stdatomic.h
> +++ b/newlib/libc/include/stdatomic.h
> @@ -207,7 +207,7 @@ typedef _Atomic(unsigned char)
> atomic_char8_t;
>  #endif
>  typedef _Atomic(__char16_t)            atomic_char16_t;
>  typedef _Atomic(__char32_t)            atomic_char32_t;
> -typedef _Atomic(___wchar_t)            atomic_wchar_t;
> +typedef _Atomic(__wchar_t)             atomic_wchar_t;
>  typedef _Atomic(__int_least8_t)                atomic_int_least8_t;
>  typedef _Atomic(__uint_least8_t)       atomic_uint_least8_t;
>  typedef _Atomic(__int_least16_t)       atomic_int_least16_t;
>
> On Sat, 16 May 2026 at 00:18, Daniel Kowalski <dkowalski@n7space.com>
> wrote:
> >
> > Hello,
> >
> > I have question regarding fairly recent change in newlib's stdatomic.h
> (Copied from FreeBSD sources as far as I understand)
> >
> > Change itself looks good, but one of the types (___wchar_t, with triple
> underscore) does not exist anywhere in newlib sources. FreeBSD defines it
> in their _types.h header.
> >
> > Is this simple oversight and extra underscore should be dropped or part
> of some larger change that wasn't fully commited and this type is supposed
> to be defined?
> >
> > change in question:
> >
> https://sourceware.org/git/?p=newlib-cygwin.git;a=blobdiff;f=newlib/libc/include/stdatomic.h;h=67107f47e6b3807b6c50de9328fce71b87b7b280;hp=204d11133170445ddd48b578a9176852014a3039;hb=e4fbaa9ea1dcc53afdd654213903e85b186c9220;hpb=09e6aec0a0b361f40fc2b528aff8b18cb2a1745a
> >
> > Best regards/Pozdrawiam
> > Daniel Kowalski
> > Software Engineer
> > N7 Space Sp. z o.o.
> > https://n7space.com
> >
> > https://bootloader.space
> > https://canopen.space
> >
>
>
> --
> Best regards,
> Maxim
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://sourceware.org/pipermail/newlib/attachments/20260609/15510853/attachment-0001.htm>


More information about the Newlib mailing list