Re: [PROPOSED 2/2] assert-h: prefer to ‘verify’

2022-09-13 Thread Bruno Haible
Paul Eggert wrote: > > # if (!defined static_assert \ > > - && __STDC_VERSION__ < 202311 && __cpp_static_assert < 201411) > > + && __STDC_VERSION__ < 202311 \ > > + && __cpp_static_assert < 201411 && __GNUG__ < 6) > > # define static_assert _Static_assert /* C11 requires this #d

Re: [PROPOSED 2/2] assert-h: prefer to ‘verify’

2022-09-13 Thread Paul Eggert
On 9/13/22 20:05, Bruno Haible wrote: # if (!defined static_assert \ - && __STDC_VERSION__ < 202311 && __cpp_static_assert < 201411) + && __STDC_VERSION__ < 202311 \ + && __cpp_static_assert < 201411 && __GNUG__ < 6) # define static_assert _Static_assert /* C11 requires this #

Re: [PROPOSED 2/2] assert-h: prefer to ‘verify’

2022-09-13 Thread Bruno Haible
Paul Eggert wrote: > Where it’s easy, prefer ‘static_assert’ to ‘verify’, Compiling a current GNU gettext with these patches on Cygwin and mingw I get a compilation error: /bin/sh ./libtool --tag=CXX --mode=compile x86_64-pc-cygwin-g++ -DIN_LIBASPRINTF -DHAVE_CONFIG_H -D__USE_MINGW_ANSI_STDIO

Re: [PROPOSED 0/2] static_assert and C23

2022-09-13 Thread Paul Eggert
On 9/13/22 17:50, Bruno Haible wrote: Looks all good to me (just from a quick review). Thanks for checking. I found a doc glitch and one minor code improvement and installed the first two attached patches which incorporate them. I also did the same thing the alignas and alignof keywords, and

Re: [PROPOSED 0/2] static_assert and C23

2022-09-13 Thread Bruno Haible
Paul Eggert wrote: > I haven't installed these into Gnulib. Comments welcome. Looks all good to me (just from a quick review). Bruno

Re: [PATCH] stdalign-tests: port to C23

2022-09-13 Thread Paul Eggert
On 9/13/22 15:19, Bruno Haible wrote: _Alignas is obsolescent? Although it's still in the standard as of draft C23, it is to some extent deprecated as it is no longer necessarily a keyword (it might be a macro). My guess is that it will be obsoleted in some future version of the standard, if

Re: [PATCH] stdalign-tests: port to C23

2022-09-13 Thread Bruno Haible
Paul Eggert wrote: > _Alignof, or _Alignas as they are obsolescent. _Alignas is obsolescent? Then we should better talk about 'alignas' instead. 2022-09-13 Bruno Haible Prefer talking about alignas than _Alignas. * m4/gnulib-common.m4 (gl_COMMON_BODY): Don't mention _Alignas

[PATCH] stdalign-tests: port to C23

2022-09-13 Thread Paul Eggert
* tests/test-stdalign.c: Do not test __alignas_is_defined, _Alignof, or _Alignas as they are obsolescent. Do not use __alignas_is_defined in C23 or later (or C++11 or later), as it’s removed in C23. --- ChangeLog | 8 doc/posix-headers/stdalign.texi | 12 ---