Re: signbit(), C++, and Solaris 10

2024-11-22 Thread Paul Eggert
On 2024-11-22 10:23, G. Branden Robinson wrote: Not the freshest release... I checked, and the problem still occurs with bleeding-edge groff (your commit 2562cf23726fc154b657d35a1d856f944f8461ad dated Wed Nov 20 23:46:16 2024 -0600) and with Oracle Solaris 12.6. So it doesn't sound like it's

gettext: pgettext uses LC_MESSAGES but locale.h is not included

2024-11-22 Thread Friedrich Beckmann
I noticed a problem when using pgettext on debian testing. When I compile the following small test program #define ENABLE_NLS 1 #include "lib/gettext.h" int test(){ if (pgettext ("This is", "a bug") == "I guess") return 1; } I get the following error: fritz@debian:~/pspp/gnulib$ gcc -c t

Re: signbit(), C++, and Solaris 10

2024-11-22 Thread G. Branden Robinson
[please keep groff@gnu in replies] Hi Paul, At 2024-11-21T21:14:35-0800, Paul Eggert wrote: > You shouldn't need to put "#include " at the start of every > source file. It needs to be included first at the start of every > compilation unit; that's good enough. Ah, thanks for the tip. > I see th

Re: [PATCH] tests: dissuade unwanted clang optimization

2024-11-22 Thread Paul Eggert
On 2024-11-22 07:50, Bruno Haible wrote: The tests now give the impression that direct use of memcpy etc. with NULL and 0 arguments is unreliable. Which — as we know so far — isn't. I suppose we test both with volatile function pointers, to test the actual Gnulib code, and without the pointers

pgettext compiler error with -O0

2024-11-22 Thread Ben Pfaff
Hello! Consider adding the following modules/gettext-tests: -- Files: tests/test-gettext.c Depends-on: configure.ac: Makefile.am: TESTS += test-gettext check_PROGRAMS += test-gettext

Re: [PATCH] tests: dissuade unwanted clang optimization

2024-11-22 Thread Bruno Haible via Gnulib discussion list
Hi Paul, Paul Eggert wrote: > Pacify Apple clang 14.0.0 (clang-1400.0.29.202) for > arm64-apple-darwin21.6.0 on test-memset_explicit.c, > which otherwise complains “warning: null passed to a callee that > requires a non-null argument [-Wnonnull]” and presumably could > do an unwanted optimization

Re: signbit(), C++, and Solaris 10

2024-11-22 Thread Damian McGuckin
On Fri, 22 Nov 2024, Bruno Haible wrote: Damian McGuckin wrote: Why does 'signbit()' have type 'bool' in the local 'math.h'? Because that's the mandated return type in C++: https://en.cppreference.com/w/cpp/numeric/math/signbit https://en.cppreference.com/w/c/numeric/math/signbit Silly me,

Re: signbit(), C++, and Solaris 10

2024-11-22 Thread Bruno Haible via Gnulib discussion list
Damian McGuckin wrote: > Why does 'signbit()' have type 'bool' in the local 'math.h'? Because that's the mandated return type in C++: https://en.cppreference.com/w/cpp/numeric/math/signbit https://en.cppreference.com/w/c/numeric/math/signbit

Re: signbit(), C++, and Solaris 10

2024-11-22 Thread Damian McGuckin
On Thu, 21 Nov 2024, G. Branden Robinson wrote: In file included from ./src/include/driver.h:25:0, from src/devices/grodvi/dvi.cpp:25: ./lib/math.h: In function ?bool signbit(float)?: ./lib/math.h:3281:1: error: ?bool signbit(float)? conflicts with a previous declar