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]

PATCH: Fix Tru64 UNIX bootstrap: initialize dwarf2_debug_hooks


Current mainline fails to bootstrap on Tru64 UNIX:

cc1: warnings being treated as errors
/vol/gcc/src/gcc-dist/gcc/dwarf2out.c:17216:30: error: uninitialized const 'dwarf2_debug_hooks' is invalid in C++
make[3]: *** [dwarf2out.o] Error 1

The following patch allows the bootstrap to continue.  I suppose it
qualifies as obvious.

Ok for mainline?

	Rainer

-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University


Mon Jun 22 16:20:12 2009  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	* dwarf2out.c (dwarf2_debug_hooks): Initialize
	non-DWARF2_DEBUGGING_INFO version.

Index: gcc/dwarf2out.c
===================================================================
--- gcc/dwarf2out.c	(revision 148784)
+++ gcc/dwarf2out.c	(working copy)
@@ -17197,7 +17213,36 @@ dwarf2out_finish (const char *filename)
 #else
 
 /* This should never be used, but its address is needed for comparisons.  */
-const struct gcc_debug_hooks dwarf2_debug_hooks;
+const struct gcc_debug_hooks dwarf2_debug_hooks =
+{
+  0,		/* init */
+  0,		/* finish */
+  0,		/* define */
+  0,		/* undef */
+  0,		/* start_source_file */
+  0,		/* end_source_file */
+  0,		/* begin_block */
+  0,		/* end_block */
+  0,		/* ignore_block */
+  0,		/* source_line */
+  0,		/* begin_prologue */
+  0,		/* end_prologue */
+  0,		/* end_epilogue */
+  0,		/* begin_function */
+  0,		/* end_function */
+  0,		/* function_decl */
+  0,		/* global_decl */
+  0,		/* type_decl */
+  0,		/* imported_module_or_decl */
+  0,		/* deferred_inline_function */
+  0,		/* outlining_inline_function */
+  0,		/* label */
+  0,		/* handle_pch */
+  0,		/* var_location */
+  0,		/* switch_text_section */
+  0,		/* set_name */
+  0		/* start_end_main_source_file */
+};
 
 #endif /* DWARF2_DEBUGGING_INFO */
 


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