From c4627eb9d227f619f4a7610f28a159b5df05b7b6 Mon Sep 17 00:00:00 2001 From: Christoffer Lerno Date: Sat, 24 Jul 2021 15:56:38 +0200 Subject: [PATCH] Removed "deprecated" as attribute. --- src/compiler/compiler_internal.h | 1 + src/compiler/enums.h | 3 +-- src/compiler/sema_decls.c | 1 - src/compiler/symtab.c | 3 ++- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compiler/compiler_internal.h b/src/compiler/compiler_internal.h index 2199374c3..66e3c997d 100644 --- a/src/compiler/compiler_internal.h +++ b/src/compiler/compiler_internal.h @@ -1503,6 +1503,7 @@ extern const char *kw_min; extern const char *kw_elements; extern const char *kw_align; extern const char *kw_alignof; +extern const char *kw_deprecated; extern const char *kw_distinct; extern const char *kw_ensure; extern const char *kw_inline; diff --git a/src/compiler/enums.h b/src/compiler/enums.h index 389dd3b5c..331cda45a 100644 --- a/src/compiler/enums.h +++ b/src/compiler/enums.h @@ -615,9 +615,8 @@ typedef enum ATTRIBUTE_VECCALL, ATTRIBUTE_REGCALL, ATTRIBUTE_FASTCALL, - ATTRIBUTE_DEPRECATED, - NUMBER_OF_ATTRIBUTES = ATTRIBUTE_DEPRECATED + 1, ATTRIBUTE_NONE, + NUMBER_OF_ATTRIBUTES = ATTRIBUTE_NONE, } AttributeType; diff --git a/src/compiler/sema_decls.c b/src/compiler/sema_decls.c index fccb54f67..deede8d4a 100644 --- a/src/compiler/sema_decls.c +++ b/src/compiler/sema_decls.c @@ -727,7 +727,6 @@ static AttributeType sema_analyse_attribute(Context *context, Attr *attr, Attrib static AttributeDomain attribute_domain[NUMBER_OF_ATTRIBUTES] = { [ATTRIBUTE_WEAK] = ATTR_FUNC | ATTR_CONST | ATTR_VAR, [ATTRIBUTE_EXTNAME] = ~0, - [ATTRIBUTE_DEPRECATED] = ~0, [ATTRIBUTE_SECTION] = ATTR_FUNC | ATTR_CONST | ATTR_VAR, [ATTRIBUTE_PACKED] = ATTR_STRUCT | ATTR_UNION | ATTR_ERROR, [ATTRIBUTE_NORETURN] = ATTR_FUNC, diff --git a/src/compiler/symtab.c b/src/compiler/symtab.c index 3af919f8b..3521cf071 100644 --- a/src/compiler/symtab.c +++ b/src/compiler/symtab.c @@ -38,6 +38,7 @@ const char *attribute_list[NUMBER_OF_ATTRIBUTES]; const char *kw_align; const char *kw_alignof; +const char *kw_deprecated; const char *kw_distinct; const char *kw_ensure; const char *kw_elements; @@ -103,6 +104,7 @@ void symtab_init(uint32_t capacity) #define KW_DEF(x) symtab_add(x, sizeof(x) - 1, fnv1a(x, sizeof(x) - 1), &type) kw_align = KW_DEF("align"); kw_alignof = KW_DEF("alignof"); + kw_deprecated = KW_DEF("deprecated"); kw_distinct = KW_DEF("distinct"); kw_elements = KW_DEF("elements"); kw_ensure = KW_DEF("ensure"); @@ -150,7 +152,6 @@ void symtab_init(uint32_t capacity) attribute_list[ATTRIBUTE_VECCALL] = KW_DEF("veccall"); attribute_list[ATTRIBUTE_REGCALL] = KW_DEF("regcall"); attribute_list[ATTRIBUTE_FASTCALL] = KW_DEF("fastcall"); - attribute_list[ATTRIBUTE_DEPRECATED] = KW_DEF("deprecated"); } static inline SymEntry *entry_find(const char *key, uint32_t key_len, uint32_t hash)