[PATCH v2 0/2] Add C23 stdbit.h functionality
Corinna Vinschen
corinna@vinschen.de
Fri Apr 17 11:26:15 GMT 2026
Hi Joel,
On Apr 16 15:55, Joel Sherrill wrote:
> On Mon, Apr 13, 2026 at 5:51 AM Corinna Vinschen <corinna@vinschen.de>
> wrote:
>
> > Hi Joel,
> >
> >
> > is that your original patchset, rather than the fixed one?
> >
> > Your stdbit/Makefile.inc is still using the incorrect %D, rather than
> > %D%.
> >
> > The new files in the stdbit subdir don't build on Cygwin, because you're
> > including limits.h without defining __STDC_WANT_IEC_60559_BFP_EXT__.
> > This will only work if you set __ISO_C_VISIBLE >= 2023, which is NOT the
> > default when building newlib. You have to make sure this stuff builds
> > even if __ISO_C_VISIBLE >= 2023 is NOT defined while building newlib.
> >
>
> I addressed this by adding "stdbit_internal.h" which provides definitions
> or the _WIDTH symbols used if they aren't already defined. I checked
> this by building with -std equal to gnu99, gnu11, and the default for the
> GCC head which is C23. This minimized changes to the FreeBSD code.
>
> I don't think we want to define __STDC_WANT_IEC_60559_BFP_EXT__
> because I am pretty sure newlib is missing most of these.
>
> https://en.cppreference.com/w/c/experimental/fpext1.html
That wasn't the point. The point was to set this *while building newlib*.
The most simple way would have been to add a line
#define __STDC_WANT_IEC_60559_BFP_EXT__
to the files in stdbit.
Corinna
More information about the Newlib
mailing list