DM_PURE = 1 << 15,
DM_CONSTRUCTOR = 1 << 16,
DM_DESTRUCTOR = 1 << 17,
- DM_USED = 1 << 18,
- DM_CDECL = 1 << 19,
- DM_FASTCALL = 1 << 20,
- DM_STDCALL = 1 << 21,
- DM_THISCALL = 1 << 22
+ DM_UNUSED = 1 << 18,
+ DM_USED = 1 << 19,
+ DM_CDECL = 1 << 20,
+ DM_FASTCALL = 1 << 21,
+ DM_STDCALL = 1 << 22,
+ DM_THISCALL = 1 << 23
} decl_modifier_t;
typedef unsigned decl_modifiers_t;
case GNU_AK_NOCOMMON:
case GNU_AK_SHARED:
case GNU_AK_NOTSHARED:
- case GNU_AK_UNUSED:
case GNU_AK_NO_INSTRUMENT_FUNCTION:
case GNU_AK_WARN_UNUSED_RESULT:
case GNU_AK_LONGCALL:
case GNU_AK_CDECL: modifiers |= DM_CDECL; goto no_arg;
case GNU_AK_FASTCALL: modifiers |= DM_FASTCALL; goto no_arg;
case GNU_AK_STDCALL: modifiers |= DM_STDCALL; goto no_arg;
+ case GNU_AK_UNUSED: modifiers |= DM_UNUSED; goto no_arg;
case GNU_AK_USED: modifiers |= DM_USED; goto no_arg;
case GNU_AK_PURE: modifiers |= DM_PURE; goto no_arg;
case GNU_AK_ALWAYS_INLINE: modifiers |= DM_FORCEINLINE; goto no_arg;
return;
for (const declaration_t *decl = global_scope->declarations; decl != NULL; decl = decl->next) {
- if (decl->used ||
- decl->modifiers & DM_USED ||
+ if (decl->used ||
+ decl->modifiers & DM_UNUSED ||
+ decl->modifiers & DM_USED ||
decl->storage_class != STORAGE_CLASS_STATIC)
continue;