for the exemple below g++ does not generate any DIE representing the namespace which name is "not_emitted". struct strukt { int m; }; namespace not_emitted { typedef strukt T; } int main() { not_emitted::T t; t.m = 0; return 0; }
Created attachment 18424 [details] fix candidate I am testing this patch ...
Patch submitted to http://gcc.gnu.org/ml/gcc-patches/2009-08/msg01405.html .
Subject: Bug 41170 Author: dodji Date: Thu Aug 27 07:05:24 2009 New Revision: 151138 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=151138 Log: Fix for PR debug/41170 gcc/ChangeLog: PR debug/41770 * dwarf2out.c (get_context_die): Declare this static function. (gen_type_die_with_usage): Make sure a DIE is a generated for the context of a typedef. gcc/testsuite/ChangeLog: PR debug/41770 * debug/dwarf2/namespace-1.C: New test. Added: trunk/gcc/testsuite/g++.dg/debug/dwarf2/namespace-1.C Modified: trunk/gcc/ChangeLog trunk/gcc/dwarf2out.c trunk/gcc/testsuite/ChangeLog
Fixed in trunk (4.5).
Subject: Bug 41170 Author: hjl Date: Sun Aug 30 01:52:18 2009 New Revision: 151217 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=151217 Log: Fix ChangeLog entries for PR debug/41170. Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog