add attributes header

This commit is contained in:
2025-03-22 13:44:14 +01:00
parent 68c61a04be
commit eb8a16beda

13
src/util/attributes.h Normal file
View File

@@ -0,0 +1,13 @@
#pragma once
#if defined(__GNUC__) || defined(__clang__)
# define atrb_deprecated __attribute__((deprecated))
# define atrb_unused __attribute__((unused))
# define atrb_pure __attribute__((pure))
# define atrb_const __attribute__((const))
#else
# define atrb_deprecated
# define atrb_unused
# define atrb_pure
# define atrb_const
#endif