halt='Use _GL... attribute macros' \
$(_sc_search_regexp)
+# Ensure that <attributes.h> macros are used in .c files.
+sc_prohibit-_gl-attributes:
+ @prohibit='_GL_ATTRIBUTE' \
+ in_vc_files='\.c$$' \
+ halt='Use ATTRIBUTE_... instead of _GL_ATTRIBUTE_...' \
+ $(_sc_search_regexp)
+
# Prefer the const declaration form, with const following the type
sc_prohibit-const-char:
@prohibit='const char \*' \
base16_encode (char const *restrict in, idx_t inlen,
char *restrict out, idx_t outlen)
{
- static const char base16[16] _GL_ATTRIBUTE_NONSTRING = "0123456789ABCDEF";
+ static const char base16[16] ATTRIBUTE_NONSTRING = "0123456789ABCDEF";
while (inlen && outlen)
{
return c_isalnum (ch) || strchr (".-:+=^!/*?&<>()[]{}@%$#", ch) != nullptr;
}
-static char const z85_encoding[85] _GL_ATTRIBUTE_NONSTRING =
+static char const z85_encoding[85] ATTRIBUTE_NONSTRING =
"0123456789"
"abcdefghijklmnopqrstuvwxyz"
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
idx_t sum;
struct base_decode_context ctx;
- char padbuf[8] _GL_ATTRIBUTE_NONSTRING = "========";
+ char padbuf[8] ATTRIBUTE_NONSTRING = "========";
inbuf = xmalloc (BASE_LENGTH (DEC_BLOCKSIZE));
outbuf = xmalloc (DEC_BLOCKSIZE);