according to gcc documentation only "__XXX__" and "XXX" should be
allowed for attribute names, but it seems gcc incorrectly also accepts
__XXX for keywords with an __XXX variant. And of course some glibc
headers use this feature.
char const *const name = symbol->string;
for (kind = ATTRIBUTE_GNU_FIRST;; ++kind) {
if (kind > ATTRIBUTE_GNU_LAST) {
+ /* special case for "__const" */
+ if (token.kind == T_const) {
+ kind = ATTRIBUTE_GNU_CONST;
+ break;
+ }
+
warningf(WARN_ATTRIBUTE, HERE, "unknown attribute '%s' ignored", name);
/* TODO: we should still save the attribute in the list... */
kind = ATTRIBUTE_UNKNOWN;