[Bug debug/14168] New: Unneeded DIEs output for imported declarations

drow at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Tue Feb 17 04:54:00 GMT 2004


This code:
typedef int ptrdiff_t;

namespace std
{
  using ::ptrdiff_t;
}

causes DIEs to be output for ptrdiff_t, std, std::ptrdiff_t, and int.  None of these
are necessary.  Ideally DW_TAG_imported_declaration would be pruned if !TREE_USED;
we have no way to find out if the copy in std is used or not.

This example highlights how schizophrenic we are about when to emit things.  We
go out of our way to emit as little as possible (way too little) for some things,
but anything imported into anything else is output, and it's not clear what use
DW_TAG_imported_declaration has if we don't do that.  There are imports all over
the standard headers and this causes lots of wasted duplicate DIEs.

-- 
           Summary: Unneeded DIEs output for imported declarations
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: drow at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14168



More information about the Gcc-bugs mailing list