if (warning.other) {
warningf(&attribute->source_position,
- "attribute '%s' needs no attributes",
+ "attribute '%s' needs no arguments",
get_attribute_name(attribute->kind));
}
}
case ATTRIBUTE_GNU_UNUSED: modifiers |= DM_UNUSED; break;
case ATTRIBUTE_GNU_DLLIMPORT: modifiers |= DM_DLLIMPORT; break;
case ATTRIBUTE_GNU_DLLEXPORT: modifiers |= DM_DLLEXPORT; break;
+ case ATTRIBUTE_GNU_WEAK: modifiers |= DM_WEAK; break;
case ATTRIBUTE_MS_ALLOCATE: modifiers |= DM_MALLOC; break;
case ATTRIBUTE_MS_DLLIMPORT: modifiers |= DM_DLLIMPORT; break;
switch(attribute->kind) {
case ATTRIBUTE_GNU_PACKED:
handle_attribute_packed(attribute, type);
- break;
+ break;
case ATTRIBUTE_GNU_CDECL:
case ATTRIBUTE_MS_CDECL:
type = change_calling_convention(type, CC_CDECL);
expression_t *expression = argument->v.expression;
if (expression->kind != EXPR_STRING_LITERAL)
return NULL;
- return expression->string.value.begin;
+ return expression->literal.value.begin;
}
return NULL;
}