On Thu, Nov 17, 2005 at 10:24:21PM -0800, Mark Mitchell wrote: > Richard Henderson wrote: > > > A solution that comes to mind is to have the front-end add dummy > > TYPE_DECL nodes to the BLOCK_VARS list of the function's outer-most > > BLOCK. If the TYPE_DECL node were marked DECL_ARTIFICIAL and had > > no DECL_NAME, it'd be easy for us to notice that we shouldn't > > actually emit debug info for the TYPE_DECL itself, but that we > > should consider its TREE_TYPE to be used. > > > > I'm open to better schemes. Perhaps a used-type hash table in > > the struct function. > > I like the idea, but I think a hash table would be better. In fact, I > think the best choice would be a hash table during compilation of the > function, transformed into a vector after the closing brace of the
Either way is fine by me. Just to make sure I understand things; you want me to hack the front-end to fill the hash table every time it parses a cast or enum type? For example: Index: c-parser.c =================================================================== --- c-parser.c (revision 107115) +++ c-parser.c (working copy) @@ -4485,6 +4485,7 @@ c_parser_cast_expression (c_parser *pars ret.original_code = ERROR_MARK; return ret; } + add_to_some_hash (TREE_TYPE (groktypename (type_name))); if (c_parser_next_token_is (parser, CPP_OPEN_BRACE)) return c_parser_postfix_expression_after_paren_type (parser, Thanks.