This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


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

RE: committed: cplus-dem.c: Add back ATTRIBUTE_UNUSED for parameter option.


Your choice of words "panic-stricken"  is pretty accurate. I removed the
ATTRIBUTE_UNUSED intentionally because I was afraid that the following would
not work with all compilers without the DEFUN macro and did not want to be
responsible for breaking things two days in a row. You obviously know better
than I, so thanks for putting it back in.

#if (GCC_VERSION < 2007)
# define __attribute__(x)
#endif

#ifndef ATTRIBUTE_UNUSED
#define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
#endif /* ATTRIBUTE_UNUSED */

In defense of Dan, I'd assume he thought that I had tested the patch in GCC.
Furthermore, I'd like to thank Dan. This patch has been around for a long.
Dan has no vested interest in the patch, but he made an effort to try to get
it checked in to benefit somebody other than himself.

As for breaking GCC, libiberty is common to Binutils and GDB and I don't
know how many other tools. Do you test all of those tools every time you
make a change to libiberty? I tested this patch with GDB and Binutils and it
worked fine. The following code is what broke it. Conditionalizing the code
in the fashion seems to invite these problems, but now that I know, in the
future I will test with GCC. Sorry about the inconvenience.

 /* These are obsolete.  Do not use.  */
#ifndef IN_GCC
#define CONST
#define DOTS
#define PROTO(type, name, arglist)      type name ()
#define EXFUN(name, proto)              name()
#define DEFUN(name, arglist, args)      name arglist args;
#define DEFUN_VOID(name)                name()
#endif /* ! IN_GCC */



 -----Original Message-----
From: 	binutils-owner@sources.redhat.com
[mailto:binutils-owner@sources.redhat.com]  On Behalf Of Hans-Peter Nilsson
Sent:	Thursday, November 16, 2000 4:18 AM
To:	gcc-patches@gcc.gnu.org; binutils@sourceware.cygnus.com
Subject:	committed: cplus-dem.c: Add back ATTRIBUTE_UNUSED for parameter
option.

An ATTRIBUTE_UNUSED was removed by the previous panic-stricken patch.  Now
reinstated.  I (actually) bootstrapped this one on i686-pc-linux-gnulibc1
(with --disable-libstdcxx-v3, because that was the only way to bootstrap
at the time.)

I fixed the remaining cplus_dem.c in the ChangeLogs and committed to gcc
and src.

Grunt: I'd say that maintainers temporarily without commit access, asking
to have patches committed, must do their ground-work and bootstrap and say
so, perhaps with an exception when bootstrap is already broken. ;-)

	* cplus-dem.c (ada_demangle): Add back ATTRIBUTE_UNUSED for
	parameter `option'.

Index: cplus-dem.c
===================================================================
RCS file: /cvs/gcc/egcs/libiberty/cplus-dem.c,v
retrieving revision 1.65
diff -p -c -r1.65 cplus-dem.c
*** cplus-dem.c	2000/11/15 17:35:20	1.65
--- cplus-dem.c	2000/11/16 07:39:52
*************** grow_vect (old_vect, size, min_size, ele
*** 953,959 ****
  static char *
  ada_demangle (mangled, option)
       const char* mangled;
!      int option;
  {
    int i, j;
    int len0;
--- 953,959 ----
  static char *
  ada_demangle (mangled, option)
       const char* mangled;
!      int option ATTRIBUTE_UNUSED;
  {
    int i, j;
    int len0;

brgds, H-P



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