From 07db3a904e974fc00e29e184c038889354d187e6 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Wed, 19 Mar 2008 23:23:05 +0000 Subject: [PATCH] add missing dllimport and dllexport attributes [r18997] --- ast_t.h | 2 ++ parser.c | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/ast_t.h b/ast_t.h index 477f92b..7743b43 100644 --- a/ast_t.h +++ b/ast_t.h @@ -486,6 +486,8 @@ typedef enum gnu_attribute_kind_t { GNU_AK_MAY_ALIAS, GNU_AK_MS_STRUCT, GNU_AK_GCC_STRUCT, + GNU_AK_DLLIMPORT, + GNU_AK_DLLEXPORT, GNU_AK_ALIGNED, GNU_AK_ALIAS, GNU_AK_SECTION, diff --git a/parser.c b/parser.c index 5290755..8393512 100644 --- a/parser.c +++ b/parser.c @@ -1026,6 +1026,8 @@ static const char *gnu_attribute_names[GNU_AK_LAST] = { [GNU_AK_MAY_ALIAS] = "may_alias", [GNU_AK_MS_STRUCT] = "ms_struct", [GNU_AK_GCC_STRUCT] = "gcc_struct", + [GNU_AK_DLLIMPORT] = "dllimport", + [GNU_AK_DLLEXPORT] = "dllexport", [GNU_AK_ALIGNED] = "aligned", [GNU_AK_ALIAS] = "alias", [GNU_AK_SECTION] = "section", @@ -1317,6 +1319,8 @@ end_error: * may_alias * ms_struct * gcc_struct + * dllimport + * dllexport * * The following attributes are parsed with arguments * aligned( const expression ) @@ -1448,6 +1452,8 @@ static void parse_gnu_attribute(gnu_attribute_t **attributes) case GNU_AK_MAY_ALIAS: case GNU_AK_MS_STRUCT: case GNU_AK_GCC_STRUCT: + case GNU_AK_DLLIMPORT: + case GNU_AK_DLLEXPORT: if(attribute->have_arguments) { /* should have no arguments */ errorf(HERE, "wrong number of arguments specified for '%s' attribute", name); -- 2.20.1