fixed ICC warning
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Wed, 19 Mar 2008 21:06:07 +0000 (21:06 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Wed, 19 Mar 2008 21:06:07 +0000 (21:06 +0000)
[r18993]

parser.c

index 606df5e..607eb45 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -1387,11 +1387,12 @@ static void parse_gnu_attribute(void)
                        name = sym->string;
                        next_token();
 
-                       gnu_attribute_kind_t kind;
-                       for(kind = 0; kind < GNU_AK_LAST; ++kind) {
-                               if(strcmp_underscore(gnu_attribute_names[kind], name) == 0)
+                       int i;
+                       for(i = 0; i < GNU_AK_LAST; ++i) {
+                               if(strcmp_underscore(gnu_attribute_names[i], name) == 0)
                                        break;
                        }
+                       gnu_attribute_kind_t kind = (gnu_attribute_kind_t)i;
 
                        if(kind == GNU_AK_LAST) {
                                if(warning.attribute)