From 22ccd41164217e2e2c5515b09cc348dca1b2f053 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 3 Feb 2011 10:52:12 +0900 Subject: [PATCH] Give struct types a name. Use the struct/union's name (minus "tag ") for the type name. --- tools/qfcc/source/struct.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/qfcc/source/struct.c b/tools/qfcc/source/struct.c index 7ea8bf594..5945c4185 100644 --- a/tools/qfcc/source/struct.c +++ b/tools/qfcc/source/struct.c @@ -82,9 +82,11 @@ find_tag (ty_type_e ty, symbol_t *tag, type_t *type) if (sym->type->ty == ty) return sym; } - if (!type) - type = new_type (); sym = new_symbol (tag_name); + if (!type) { + type = new_type (); + type->name = sym->name + 4; + } sym->type = type; sym->type->type = ev_invalid; sym->type->ty = ty;