Re: stdckdint-h: Work around missing declarations with g++ 15.0.

2025-05-22 Thread Collin Funk
Hi Bruno, Bruno Haible writes: > Reviewing the patch: It's nearly right, except: > > 1) In m4/stdckdint.m4: > > + if test $HAVE_STDCKDINT_H == 1; then > > '==' is an invalid operator for 'test'. See > https://pubs.opengroup.org/onlinepubs/9799919799/utilities/test.html > or https://www.man7.org

Re: stdckdint-h: Work around missing declarations with g++ 15.0.

2025-05-22 Thread Bruno Haible via Gnulib discussion list
Hi Collin, Thanks for working on this. > With GCC 15 and C++26 the result is (*): > > $ ./configure CFLAGS='-std=gnu99' CXXFLAGS='-std=gnu++26' | grep stdckdint > checking for stdckdint.h... yes > checking whether stdckdint.h can be included in C... yes > checking whether stdckdin

Re: stdckdint-h: Work around missing declarations with g++ 15.0.

2025-05-21 Thread Collin Funk
ables set by ./configure. + * lib/stdckdint.in.h: Include the compilers header if it exists. + (ckd_add, ckd_sub, ckd_mul): Only define if the compilers definitions do + not work. + 2025-05-19 Collin Funk stdckdint-h: Work around missing declarations with g++ 15.0. diff --git a/lib/stdckdint

Re: stdckdint-h: Work around missing declarations with g++ 15.0.

2025-05-21 Thread Paul Eggert
On 5/21/25 14:44, Bruno Haible wrote: I would therefore propose a more future-proof approach: based on the same approach as we have been taken for so many other .h files. Yes that all should work. All I'm saying is that if that approach determines that the system is fine (for both C and C++,

Re: stdckdint-h: Work around missing declarations with g++ 15.0.

2025-05-21 Thread Bruno Haible via Gnulib discussion list
Paul Eggert wrote: > > we have no way of portably setting the compiler flags > > if available. > > That's fine, but Gnulib does have a portable way to see whether the C++ > compiler works properly with . Namely, compile a little > test with the C++ compiler and if that compiles OK, do not > ge

Re: stdckdint-h: Work around missing declarations with g++ 15.0.

2025-05-21 Thread Collin Funk
Bruno Haible via Gnulib discussion list writes: > Paul Eggert wrote: >> As the stdckdint.h bug in question is fixed in GCC 15.1, wouldn't it be >> better if the Gnulib workaround is used only if the bug is present (GCC >> 15.0)? > > Who said that is was fixed in GCC 15.1 ? I reproduce it with g

Re: stdckdint-h: Work around missing declarations with g++ 15.0.

2025-05-21 Thread Bruno Haible via Gnulib discussion list
Paul Eggert wrote: > As the stdckdint.h bug in question is fixed in GCC 15.1, wouldn't it be > better if the Gnulib workaround is used only if the bug is present (GCC > 15.0)? Who said that is was fixed in GCC 15.1 ? I reproduce it with groff HEAD and gnulib HEAD~2 and GCC 15.1.0 (built from sou

Re: stdckdint-h: Work around missing declarations with g++ 15.0.

2025-05-21 Thread Collin Funk
Paul Eggert writes: > That's fine, but Gnulib does have a portable way to see whether the > C++ compiler works properly with . Namely, compile a > little test with the C++ compiler and if that compiles > OK, do not generate stdckdint.h. > > In general we're better off if we don't second-guess a

Re: stdckdint-h: Work around missing declarations with g++ 15.0.

2025-05-21 Thread Paul Eggert
On 2025-05-20 19:33, Collin Funk wrote: we have no way of portably setting the compiler flags if available. That's fine, but Gnulib does have a portable way to see whether the C++ compiler works properly with . Namely, compile a little test with the C++ compiler and if that compiles OK, do

Re: stdckdint-h: Work around missing declarations with g++ 15.0.

2025-05-20 Thread Collin Funk
Hi Paul, Paul Eggert writes: > As the stdckdint.h bug in question is fixed in GCC 15.1, wouldn't it > be better if the Gnulib workaround is used only if the bug is present > (GCC 15.0)? Sorry if I phrased it poorly in my previous messages. But it is not a GCC bug. Apparently the C++26 standard

Re: stdckdint-h: Work around missing declarations with g++ 15.0.

2025-05-20 Thread Paul Eggert
As the stdckdint.h bug in question is fixed in GCC 15.1, wouldn't it be better if the Gnulib workaround is used only if the bug is present (GCC 15.0)?

Re: stdckdint-h: Work around missing declarations with g++ 15.0.

2025-05-20 Thread Collin Funk
Hi Branden, "G. Branden Robinson" writes: > Thanks for checking the build! I don't have an environment quite that > fresh set up and handy. No problem. If you ever feel like testing it you can always create a Fedora container: $ docker run --rm -t -i fedora:latest $ dnf install gcc

Re: stdckdint-h: Work around missing declarations with g++ 15.0.

2025-05-20 Thread Collin Funk
Hi Bruno, Bruno Haible writes: > We need to test this manually, since the CI runs on GitHub are not > using the gnulib-tool --with-c++-tests. Ah, for some reason I thought we did. > Successfully tested with Solaris 10 CC, Oracle dev studio 12.6 CC, > AIX 7.1 xlC, MSVC 14. So, all is fine. Tha

Re: stdckdint-h: Work around missing declarations with g++ 15.0.

2025-05-20 Thread Bruno Haible via Gnulib discussion list
G. Branden Robinson wrote: > Do you think it would be a good idea to backport these fixes to gnulib's > stable/2025-01 branch? I think that yes, the second patch fits the criteria for stable branches . The next round of st

Re: stdckdint-h: Work around missing declarations with g++ 15.0.

2025-05-20 Thread G. Branden Robinson
[please CC me on replies] Hi Collin, At 2025-05-19T21:46:08-0700, Collin Funk wrote: > When compiling Groff with GCC/G++ 15.0, I run into this compiler > error: Thanks for checking the build! I don't have an environment quite that fresh set up and handy. [snip stdckdint build failure] > The im

Re: stdckdint-h: Work around missing declarations with g++ 15.0.

2025-05-20 Thread Bruno Haible via Gnulib discussion list
Collin Funk wrote: > The immediate fix that comes to mind is using 'g++ -std=gnu23', but > there are 2 issues with this: > > 1. gnulib/m4/std-gnu23.m4 has no code for C++ versions, because no > one interested in C++ has contributed it to Autoconf yet. > 2. Bruno told me that the C++ st

stdckdint-h: Work around missing declarations with g++ 15.0.

2025-05-19 Thread Collin Funk
d9784e74fa5f72e23.1747715373.git.collin.fu...@gmail.com> References: <5948807b3e200214799d323d9784e74fa5f72e23.1747715373.git.collin.fu...@gmail.com> From: Collin Funk Date: Mon, 19 May 2025 21:29:03 -0700 Subject: [PATCH 2/2] stdckdint-h: Work around missing declarations with g++ 15.0. * modules/stdc