[3.4] Fix C structure nesting for dwarf2out

Geoff Keating geoffk@geoffk.org
Tue Jan 25 22:38:00 GMT 2005


On 25/01/2005, at 11:36 AM, Daniel Jacobowitz wrote:

> 2004-09-22  Mark Mitchell  <mark@codesourcery.com>
>
> 	* gcc/dwarf2out.c (scope_die_for): If the containing scope is a
> 	TRANSLATION_UNIT_DECL, consider it to be a global.

This is OK.

> Index: dwarf2out.c
> ===================================================================
> RCS file: /big/fsf/rsync/gcc-cvs/gcc/gcc/dwarf2out.c,v
> retrieving revision 1.478.2.10
> retrieving revision 1.478.2.10.2.1
> diff -u -p -r1.478.2.10 -r1.478.2.10.2.1
> --- dwarf2out.c	24 Aug 2004 02:07:22 -0000	1.478.2.10
> +++ dwarf2out.c	23 Sep 2004 07:27:07 -0000	1.478.2.10.2.1
> @@ -10215,7 +10215,8 @@ scope_die_for (tree t, dw_die_ref contex
>    if (containing_scope && TREE_CODE (containing_scope) == 
> FUNCTION_TYPE)
>      containing_scope = NULL_TREE;
>
> -  if (containing_scope == NULL_TREE)
> +  if (containing_scope == NULL_TREE
> +      || TREE_CODE (containing_scope) == TRANSLATION_UNIT_DECL)
>      scope_die = comp_unit_die;
>    else if (TYPE_P (containing_scope))
>      {
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2410 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20050125/72b3c845/attachment.p7s>


More information about the Gcc-patches mailing list