From 2eba61dbb2d750ff6ab8f8bfba925a60e42dfc81 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Sun, 25 May 2008 11:30:08 +0000 Subject: [PATCH] add mode attribute parsing [r19761] --- parser.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/parser.c b/parser.c index 84891eb..82daa44 100644 --- a/parser.c +++ b/parser.c @@ -1048,6 +1048,7 @@ static const char *gnu_attribute_names[GNU_AK_LAST] = { [GNU_AK_TLS_MODEL] = "tls_model", [GNU_AK_VISIBILITY] = "visibility", [GNU_AK_REGPARM] = "regparm", + [GNU_AK_MODE] = "mode", [GNU_AK_MODEL] = "model", [GNU_AK_TRAP_EXIT] = "trap_exit", [GNU_AK_SP_SWITCH] = "sp_switch", @@ -1538,6 +1539,12 @@ static void parse_gnu_attribute(gnu_attribute_t **attributes) errorf(HERE, "wrong number of arguments specified for '%s' attribute", name); } else parse_gnu_attribute_model_arg(attribute); + case GNU_AK_MODE: + if(!attribute->have_arguments) { + /* should have arguments */ + errorf(HERE, "wrong number of arguments specified for '%s' attribute", name); + } else + parse_gnu_attribute_const_arg(attribute); case GNU_AK_INTERRUPT: /* may have one string argument */ if(attribute->have_arguments) -- 2.20.1