# HG changeset patch # User Mike Becker # Date 1745055195 -7200 # Node ID f81d8b4f40c4b32b12de645f344f126db001117c # Parent fcb149ee60ff0a50a72bd8859d4a41b760d1800b fix code not compiling with GCC 15 diff -r fcb149ee60ff -r f81d8b4f40c4 CHANGELOG --- a/CHANGELOG Thu Apr 17 21:45:01 2025 +0200 +++ b/CHANGELOG Sat Apr 19 11:33:15 2025 +0200 @@ -15,6 +15,7 @@ * fixes implementation of cxBufferTerminate() * fixes allocator arguments for some printf.h functions not being const * fixes that cx_tree_search() did not investigate subtrees with equally good distance + * removes the use of C23 attributes because they don't mix well with GNU attributes in GCC 15 Version 3.1 - 2025-02-11 ------------------------ diff -r fcb149ee60ff -r f81d8b4f40c4 docs/Writerside/topics/about.md --- a/docs/Writerside/topics/about.md Thu Apr 17 21:45:01 2025 +0200 +++ b/docs/Writerside/topics/about.md Sat Apr 19 11:33:15 2025 +0200 @@ -42,6 +42,7 @@ * fixes implementation of cxBufferTerminate() * fixes allocator arguments for some printf.h functions not being const * fixes that cx_tree_search() did not investigate subtrees with equally good distance +* removes the use of C23 attributes because they don't mix well with GNU attributes in GCC 15 ### Version 3.1 - 2025-02-11 {collapsible="true"} diff -r fcb149ee60ff -r f81d8b4f40c4 src/cx/common.h --- a/src/cx/common.h Thu Apr 17 21:45:01 2025 +0200 +++ b/src/cx/common.h Sat Apr 19 11:33:15 2025 +0200 @@ -240,20 +240,6 @@ */ #define cx_attr_access_w(...) cx_attr_access(__write_only__, __VA_ARGS__) -#if __STDC_VERSION__ >= 202300L - -/** - * Do not warn about unused variable. - */ -#define cx_attr_unused [[maybe_unused]] - -/** - * Warn about discarded return value. - */ -#define cx_attr_nodiscard [[nodiscard]] - -#else // no C23 - /** * Do not warn about unused variable. */ @@ -264,8 +250,6 @@ */ #define cx_attr_nodiscard __attribute__((__warn_unused_result__)) -#endif // __STDC_VERSION__ - // --------------------------------------------------------------------------- // MSVC specifics