missing return added
[cparser] / parser.c
index 5290755..2577cb1 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",
@@ -1067,6 +1069,7 @@ static gnu_attribute_t *allocate_gnu_attribute(gnu_attribute_kind_t kind) {
        attribute->next           = NULL;
        attribute->invalid        = false;
        attribute->have_arguments = false;
+       return attribute;
 }
 
 /**
@@ -1317,6 +1320,8 @@ end_error:
  *  may_alias
  *  ms_struct
  *  gcc_struct
+ *  dllimport
+ *  dllexport
  *
  * The following attributes are parsed with arguments
  *  aligned( const expression )
@@ -1448,6 +1453,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);