public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Olivier Hainque <hainque@adacore.com>
To: gcc-patches@gcc.gnu.org
Cc: hainque@adacore.com
Subject: [PATCH] fix dbxout.c bootstrap failure on rs6000-aix
Date: Wed, 29 Aug 2007 10:45:00 -0000	[thread overview]
Message-ID: <20070829100404.GA26895@cardhu.act-europe.fr> (raw)

[-- 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 ----

             reply	other threads:[~2007-08-29 10:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-29 10:45 Olivier Hainque [this message]
2007-08-31  2:56 ` Mark Mitchell
2007-08-31  9:14   ` Olivier Hainque

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070829100404.GA26895@cardhu.act-europe.fr \
    --to=hainque@adacore.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).