X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=attribute.c;h=215a8e6d602183767417a531a4037ff3eaf1cd0a;hb=f7f1fcc7021a3c622316b6415c16f83d0a64ae4a;hp=07f152bbf29f65d5c11581e91bb8669502b17ecd;hpb=9634f9c53e95b6bdc7883228c5ec5147f3de4f8e;p=cparser diff --git a/attribute.c b/attribute.c index 07f152b..215a8e6 100644 --- a/attribute.c +++ b/attribute.c @@ -171,14 +171,10 @@ type_t *handle_attribute_mode(const attribute_t *attribute, type_t *orig_type) return orig_type; } - if (type->kind == TYPE_ATOMIC) { + if (type->kind == TYPE_ATOMIC || type->kind == TYPE_ENUM) { type_t *copy = duplicate_type(type); copy->atomic.akind = akind; return identify_new_type(copy); - } else if (type->kind == TYPE_ENUM) { - type_t *copy = duplicate_type(type); - copy->enumt.akind = akind; - return identify_new_type(copy); } else if (is_type_pointer(type)) { source_position_t const *const pos = &attribute->source_position; warningf(WARN_OTHER, pos, "__attribute__((mode)) on pointers not implemented yet (ignored)");