This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/14168] New: Unneeded DIEs output for imported declarations
- From: "drow at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Feb 2004 04:54:11 -0000
- Subject: [Bug debug/14168] New: Unneeded DIEs output for imported declarations
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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