From e03ac00fa174e69c4aeaa554471226257f8a592a Mon Sep 17 00:00:00 2001 From: leitner Date: Wed, 14 May 2025 10:51:37 +0000 Subject: [PATCH] add att_nonstring to compiler.h (for gcc 15) --- CHANGES | 1 + compiler.h | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/CHANGES b/CHANGES index 201f078..28e6a0a 100644 --- a/CHANGES +++ b/CHANGES @@ -7,6 +7,7 @@ gcc 15 and C23 force some union trickery on buffer.h :-( add a few buffer_init*_forread variants to pretend we have type safety make sure buffer_init_staticcontents handles flushing attempts + add att_nonstring to compiler.h (for gcc 15) 0.34: be more C99 compliant (Florian Weimer) diff --git a/compiler.h b/compiler.h index 0b2e57d..cb346d1 100644 --- a/compiler.h +++ b/compiler.h @@ -247,4 +247,10 @@ #define att_free_with(func,argpos) __attribute__((malloc)) #endif +#if __has_attribute(nonstring) +#define att_nonstring __attribute__((__nonstring__)) +#else +#define att_nonstring +#endif + #endif