add att_nonstring to compiler.h (for gcc 15)

This commit is contained in:
leitner
2025-05-14 10:51:37 +00:00
parent 5daa91a981
commit e03ac00fa1
2 changed files with 7 additions and 0 deletions

View File

@@ -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)

View File

@@ -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