This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/21391] New: referencing a type via a cast does not emit it for debug
- From: "pkoning at equallogic dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 May 2005 20:32:05 -0000
- Subject: [Bug c/21391] New: referencing a type via a cast does not emit it for debug
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Test program:
struct foo
{
int i;
};
int bar (void)
{
return ((struct foo *)0x1234)->i;
}
Compile with -g; readelf does NOT show a definition of "struct foo" in the debug
data.
If I compile with -fno-eliminate-unused-debug-types, the definition does
appear, but in the example program, foo isn't "unused".
--
Summary: referencing a type via a cast does not emit it for debug
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pkoning at equallogic dot com
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=21391