This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[google] fix build warning (issue5341048)


Fix the build warning introduced in r180971.

This is for google branch only.

Tested with build.

2011-11-07   Rong Xu  <xur@google.com>

	* gcc/dwarf2out.c (dwarf2out_decl): fix mixed declarations and code.

Index: gcc/dwarf2out.c
===================================================================
--- gcc/dwarf2out.c	(revision 180977)
+++ gcc/dwarf2out.c	(working copy)
@@ -19746,6 +19746,8 @@
 void
 dwarf2out_decl (tree decl)
 {
+  dw_die_ref context_die;
+
   /* In LIPO mode, we may output some functions whose type is defined
      in another function that will not be output. This can result in
      undefined location list symbols in the debug type info.
@@ -19779,7 +19781,7 @@
       }
     }
 
-  dw_die_ref context_die = comp_unit_die ();
+  context_die = comp_unit_die ();
 
   switch (TREE_CODE (decl))
     {

--
This patch is available for review at http://codereview.appspot.com/5341048


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]