public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] fix dbxout.c bootstrap failure on rs6000-aix
@ 2007-08-29 10:45 Olivier Hainque
  2007-08-31  2:56 ` Mark Mitchell
  0 siblings, 1 reply; 3+ messages in thread
From: Olivier Hainque @ 2007-08-29 10:45 UTC (permalink / raw)
  To: gcc-patches; +Cc: hainque

[-- Attachment #1: Type: text/plain, Size: 928 bytes --]


Hello,

Boostrapping a recent trunk on powerpc-ibm-aix5.3.0.0 fails in stage2
with

  cc1: warnings being treated as errors
  .../src/gcc/dbxout.c:3393: error: 'dbxout_block' defined but not used
 
which looks legitimate to me. dbxout_block and a number of associated
helpers are only referenced #if defined (DBX_DEBUGGING_INFO), and
their definition is not so restricted.

The attached patch fixes that by arranging to have the definitions and
associated declarations conditioned the same way as the references, that is,
within an #if defined (DBX_DEBUGGING_INFO) block.

Tested by checking that the bootstrap proceeds past the failure point
after the change.

Olivier

2007-08-29  Olivier Hainque  <hainque@adacore.com>

	* dbxout.c (dbxout_block): Move declaration within the first
	#if defined (DBX_DEBUGGING_INFO) block.  Rearrange another such
	block to include the definition, together with the associated
	helpers.





[-- Attachment #2: dbxout_block.dif --]
[-- Type: text/plain, Size: 1441 bytes --]

Index: dbxout.c
===================================================================
*** dbxout.c	(revision 127825)
--- dbxout.c	(working copy)
*************** static void dbxout_type_name (tree);
*** 326,332 ****
  static void dbxout_class_name_qualifiers (tree);
  static int dbxout_symbol_location (tree, tree, const char *, rtx);
  static void dbxout_symbol_name (tree, const char *, int);
- static void dbxout_block (tree, int, tree);
  static void dbxout_global_decl (tree);
  static void dbxout_type_decl (tree, int);
  static void dbxout_handle_pch (unsigned);
--- 326,331 ----
*************** dbxout_handle_pch (unsigned at_end)
*** 1215,1220 ****
--- 1214,1222 ----
  }
  
  #if defined (DBX_DEBUGGING_INFO)
+ 
+ static void dbxout_block (tree, int, tree);
+ 
  /* Output debugging info to FILE to switch to sourcefile FILENAME.  */
  
  static void
*************** dbxout_args (tree args)
*** 3343,3348 ****
--- 3345,3352 ----
      }
  }
  \f
+ #if defined (DBX_DEBUGGING_INFO)
+ 
  /* Subroutine of dbxout_block.  Emit an N_LBRAC stab referencing LABEL.
     BEGIN_LABEL is the name of the beginning of the function, which may
     be required.  */
*************** dbxout_block (tree block, int depth, tre
*** 3473,3479 ****
     Usually this follows the function's code,
     but on some systems, it comes before.  */
  
- #if defined (DBX_DEBUGGING_INFO)
  static void
  dbxout_begin_function (tree decl)
  {
--- 3477,3482 ----

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] fix dbxout.c bootstrap failure on rs6000-aix
  2007-08-29 10:45 [PATCH] fix dbxout.c bootstrap failure on rs6000-aix Olivier Hainque
@ 2007-08-31  2:56 ` Mark Mitchell
  2007-08-31  9:14   ` Olivier Hainque
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Mitchell @ 2007-08-31  2:56 UTC (permalink / raw)
  To: Olivier Hainque; +Cc: gcc-patches

Olivier Hainque wrote:

> 2007-08-29  Olivier Hainque  <hainque@adacore.com>
> 
> 	* dbxout.c (dbxout_block): Move declaration within the first
> 	#if defined (DBX_DEBUGGING_INFO) block.  Rearrange another such
> 	block to include the definition, together with the associated
> 	helpers.

OK.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] fix dbxout.c bootstrap failure on rs6000-aix
  2007-08-31  2:56 ` Mark Mitchell
@ 2007-08-31  9:14   ` Olivier Hainque
  0 siblings, 0 replies; 3+ messages in thread
From: Olivier Hainque @ 2007-08-31  9:14 UTC (permalink / raw)
  To: Mark Mitchell; +Cc: gcc-patches, hainque

Mark Mitchell wrote:
> > 	* dbxout.c (dbxout_block): Move declaration within the first
> > 	#if defined (DBX_DEBUGGING_INFO) block.  Rearrange another such
> > 	block to include the definition, together with the associated
> > 	helpers.
> 
> OK.

 rev 127955. Thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-08-31  7:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-29 10:45 [PATCH] fix dbxout.c bootstrap failure on rs6000-aix Olivier Hainque
2007-08-31  2:56 ` Mark Mitchell
2007-08-31  9:14   ` Olivier Hainque

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).