rewrite of attribute handling
[cparser] / mangle.c
index 1eb6a16..98fc1d7 100644 (file)
--- a/mangle.c
+++ b/mangle.c
@@ -222,7 +222,6 @@ static void mangle_type(type_t *orig_type)
 
        case TYPE_BITFIELD:
                panic("no mangling for this type implemented yet");
-               break;
        }
        panic("invalid type encountered while mangling");
 }
@@ -262,12 +261,11 @@ ident *create_name_win32(entity_t *entity)
 
        assert(is_declaration(entity));
 
-       if (entity->declaration.modifiers & DM_DLLIMPORT) {
-               /* add prefix for imported symbols */
-               obstack_printf(o, "__imp_");
-       }
-
        if (entity->kind == ENTITY_FUNCTION) {
+               if (entity->declaration.modifiers & DM_DLLIMPORT)
+                       /* add prefix for imported symbols */
+                       obstack_printf(o, "__imp_");
+
                cc_kind_t cc = entity->declaration.type->function.calling_convention;
 
                /* calling convention prefix */