X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=attribute.c;h=215a8e6d602183767417a531a4037ff3eaf1cd0a;hb=c080804a9ae61e4ba0ec6fc7288c81c326fa9ddb;hp=07f152bbf29f65d5c11581e91bb8669502b17ecd;hpb=bb8544d38aaa4c716603a5d565c3ff3840454ffc;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)");