On 2025-05-07 14:31, Bruno Haible wrote:
-#if defined __GNUC__ || defined __clang__ -# if ! (2 < __GNUC__ + (8 <= __GNUC_MINOR__) || defined __clang__ \ - || 0x5150 <= __SUNPRO_C) +#if (defined __GNUC__ || defined __clang__ \ + || (defined __SUNPRO_C && 0x5150 <= __SUNPRO_C)) +# if defined __GNUC__ && ! (2 < __GNUC__ + (8 <= __GNUC_MINOR__)) # define __extension__ # endifThat does not look like what the ChangeLog entry says. The patch adds a __SUNPRO_C clause to the_outer_ #if, and it removes a __SUNPRO_C clause from the definition of __extension__. Does Solaris cc of version 0x5150 or newer really support statement-expressions?
Yes it does[1]. Thanks for reporting the ChangeLog mistake; I installed the attached.
[1]: https://docs.oracle.com/cd/E77782_01/html/E77792/gqexw.html#OSGCCgqexp
From 6cedbdccd34c2c5b5d950cd8219903b0a6422c8f Mon Sep 17 00:00:00 2001 From: Paul Eggert <egg...@cs.ucla.edu> Date: Wed, 7 May 2025 20:15:34 -0700 Subject: [PATCH] ChangeLog fix Problem reported by Bruno Haible in: https://lists.gnu.org/r/bug-gnulib/2025-05/msg00096.html --- ChangeLog | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e63d92728a..211e45f8a0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,10 +5,12 @@ (obstack_free): Use it instead of comparing pointers directly, when the pointers might not point into the same object. - obstack: check def before use in macros + obstack: check def before use; use ({...}) in last Sun C * lib/obstack.in.h (__attribute_noreturn__, __extension__): Be more careful about checking whether a macro is defined before using it, as some compilers complain otherwise. + Use statement expressions and __extension__ in + Oracle Developer Studio 12.6, where __SUNPRO_C == 0x5150. Simplify the logic for __extension__. 2025-05-07 Bruno Haible <br...@clisp.org> -- 2.48.1