Re: assert-h: Make static_assert work on Solaris 11.4

2022-10-25 Thread Bruno Haible
Paul Eggert wrote: > I suppose the Gnulib assert-h module could be enhanced to support this > C23 extension. Low priority for me as I don't deal with Gnulib + C++ and > the problem comes up more rarely in C than in C++. I agree. Especially since I know of no system (so far) whose does it right.

Re: assert-h: Make static_assert work on Solaris 11.4

2022-10-25 Thread Paul Eggert
On 10/25/22 13:11, Bruno Haible wrote: The assert macro shall be implemented as a macro with an ellipsis parameter, not as an actual function. Thanks for clarifying it for me. I suppose the Gnulib assert-h module could be enhanced to support this C23 extension. Low priority for me as I

Re: assert-h: Make static_assert work on Solaris 11.4

2022-10-25 Thread Bruno Haible
Paul Eggert wrote: > > Re: the ellipses. From > > https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2264r3.html, > > Section 8: > > Thanks. Although that sort of explains things, it doesn't explain why > the latest draft uses ellipses only when NDEBUG is defined. Shouldn't > ellipses als

Re: assert-h: Make static_assert work on Solaris 11.4

2022-10-25 Thread Bruno Haible
Paul Eggert asked: > >#include > >#undef/**/assert > > + /* Solaris 11.4 defines static_assert as a macro with 2 > > arguments. > > +We need it also to be invocable with a single argument. */ > > + #if defined __sun && (__STDC_VERSION__ - 0 >= 201112L) && !defined > > __cplusplus >

Re: assert-h: Make static_assert work on Solaris 11.4

2022-10-25 Thread Paul Eggert
On 2022-10-25 11:18, Jeffrey Walton wrote: Re: the ellipses. From https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2264r3.html, Section 8: Thanks. Although that sort of explains things, it doesn't explain why the latest draft uses ellipses only when NDEBUG is defined. Shouldn't ellip

Re: assert-h: Make static_assert work on Solaris 11.4

2022-10-25 Thread Jeffrey Walton
On Tue, Oct 25, 2022 at 2:13 PM Paul Eggert wrote: > > On 2022-10-23 07:47, Bruno Haible wrote: > >#include > >#undef/**/assert > > + /* Solaris 11.4 defines static_assert as a macro with 2 > > arguments. > > +We need it also to be invocable with a single argument. */ > > + #if def

Re: assert-h: Make static_assert work on Solaris 11.4

2022-10-25 Thread Paul Eggert
On 2022-10-23 07:47, Bruno Haible wrote: #include #undef/**/assert + /* Solaris 11.4 defines static_assert as a macro with 2 arguments. +We need it also to be invocable with a single argument. */ + #if defined __sun && (__STDC_VERSION__ - 0 >= 201112L) && !defined __cplusplus + #und

assert-h: Make static_assert work on Solaris 11.4

2022-10-23 Thread Bruno Haible
any Gnulib source files use 'static_assert' with 1 argument only. [1] https://lists.gnu.org/archive/html/sed-devel/2022-10/msg4.html [2] https://lists.gnu.org/archive/html/bug-texinfo/2022-10/msg00188.html This patch fixes it. 2022-10-23 Bruno Haible assert-h: Make static_as