This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch installed for -Werror failure in dbxout.c
- From: Andreas Schwab <schwab at suse dot de>
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Cc: gcc-patches at gcc dot gnu dot org, geoffk at apple dot com
- Date: Sat, 08 Nov 2003 19:48:10 +0100
- Subject: Re: Patch installed for -Werror failure in dbxout.c
- References: <200311081512.hA8FCLJg027077@caip.rutgers.edu>
"Kaveh R. Ghazi" <ghazi@caip.rutgers.edu> writes:
> I installed the following patch to fix a -Werror bootstrap failure on
> mips-sgi-irix6.5:
>
> > dbxout.c:206: warning: 'current_file' defined but not used
> > make[2]: *** [dbxout.o] Error 1
>
>
>
> Index: ChangeLog
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/ChangeLog,v
> retrieving revision 2.1702
> diff -u -p -r2.1702 ChangeLog
> --- ChangeLog 8 Nov 2003 02:20:59 -0000 2.1702
> +++ ChangeLog 8 Nov 2003 15:08:31 -0000
> @@ -1,3 +1,7 @@
> +2003-11-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
> +
> + * dbxout.c (current_file): Wrap declaration in DBX_USE_BINCL.
> +
That's not enough. DBX_USE_BINCL may be defined even if neither
DBX_DEBUGGING_INFO nor XCOFF_DEBUGGING_INFO are defined, like on ia64.
Committing the following.
Andreas.
2003-11-08 Andreas Schwab <schwab@suse.de>
* dbxout.c (current_file): Also wrap inside DBX_DEBUGGING_INFO ||
XCOFF_DEBUGGING_INFO.
--- gcc/dbxout.c.~1.166.~ 2003-11-08 16:56:30.000000000 +0100
+++ gcc/dbxout.c 2003-11-08 19:43:46.000000000 +0100
@@ -203,7 +203,8 @@ struct dbx_file
should always be 0 because we should not have needed any file numbers
yet. */
-#ifdef DBX_USE_BINCL
+#if (defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO)) \
+ && defined (DBX_USE_BINCL)
static struct dbx_file *current_file;
#endif
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."