add missing dllimport and dllexport attributes
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Wed, 19 Mar 2008 23:23:05 +0000 (23:23 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Wed, 19 Mar 2008 23:23:05 +0000 (23:23 +0000)
[r18997]

ast_t.h
parser.c

diff --git a/ast_t.h b/ast_t.h
index 477f92b..7743b43 100644 (file)
--- 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,
index 5290755..8393512 100644 (file)
--- 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);