prototypes ld/

Andreas Jaeger aj@suse.de
Thu Aug 9 07:51:00 GMT 2001


Alan Modra <amodra@bigpond.net.au> writes:

> ld/ChangeLog
> 	* emultempl/elf32.em (output_prev_sec_find): Add missing prototype.
>
> Applying to mainline.

Shouldn't we add -Wstrict-prototypes to WARN_CFLAGS to catch these?

Here's an untested patch for gas.  If this is ok, I can send similar
patches for binutils, bfd and ld.

Andreas

2001-08-09  Andreas Jaeger  <aj@suse.de>

	* configure.in: Add -Wstrict-prototypes.

============================================================
Index: gas/configure.in
--- gas/configure.in	2001/07/14 14:44:39	1.72
+++ gas/configure.in	2001/08/09 14:50:09
@@ -44,7 +44,7 @@ esac])dnl
 
 using_cgen=no
 
-build_warnings="-W -Wall"
+build_warnings="-W -Wall -Wstrict-prototypes"
 AC_ARG_ENABLE(build-warnings,
 [  --enable-build-warnings Enable build-time compiler warnings if gcc is used],
 [case "${enableval}" in
-- 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE7cqNnOJpWPMJyoSYRAmayAKCBquJd0tVe8ROhHfE6eiHrk68c6gCfXjDy
D1WCkku+BX/X6rAvS8NbrpU=
=uvBL
-----END PGP SIGNATURE-----From amodra@bigpond.net.au Thu Aug 09 07:56:00 2001
From: Alan Modra <amodra@bigpond.net.au>
To: binutils@sourceware.cygnus.com
Subject: prototype gprof/
Date: Thu, 09 Aug 2001 07:56:00 -0000
Message-id: <20010810002641.F1211@bubble.sa.bigpond.net.au>
X-SW-Source: 2001-08/msg00194.html
Content-length: 3077

That's all I'll do for tonight.  There are still quite a few missing
prototypes.  With luck, someone else will contribute a few.  ;-)

gprof/ChangeLog
	* alpha.c: Add missing prototypes.
	* sparc.c: Likewise.
	* tahoe.c: Likewise.
	* vax.c: Likewise.
	* i386.c: Likewise.
	(i386_iscall): Don't use DEFUN.

Applying to mainline.

-- 
Alan Modra

Index: gprof/alpha.c
===================================================================
RCS file: /cvs/src/src/gprof/alpha.c,v
retrieving revision 1.2
diff -u -p -r1.2 alpha.c
--- alpha.c	1999/06/30 22:38:16	1.2
+++ alpha.c	2001/08/09 13:55:39
@@ -62,6 +62,7 @@ alpha_Instruction;
 
 static Sym indirect_child;
 
+void alpha_find_call PARAMS ((Sym *, bfd_vma, bfd_vma));
 
 /*
  * On the Alpha we can only detect PC relative calls, which are
Index: gprof/i386.c
===================================================================
RCS file: /cvs/src/src/gprof/i386.c,v
retrieving revision 1.4
diff -u -p -r1.4 i386.c
--- i386.c	2001/03/14 03:14:56	1.4
+++ i386.c	2001/08/09 13:55:39
@@ -22,9 +22,12 @@
 #include "hist.h"
 #include "symtab.h"
 
+int i386_iscall PARAMS ((unsigned char *));
+void i386_find_call PARAMS ((Sym *, bfd_vma, bfd_vma));
 
 int
-DEFUN (i386_iscall, (ip), unsigned char *ip)
+i386_iscall (ip)
+     unsigned char *ip;
 {
   if (*ip == 0xe8)
     return 1;
Index: gprof/sparc.c
===================================================================
RCS file: /cvs/src/src/gprof/sparc.c,v
retrieving revision 1.2
diff -u -p -r1.2 sparc.c
--- sparc.c	1999/06/30 22:38:23	1.2
+++ sparc.c	2001/08/09 13:55:39
@@ -27,6 +27,8 @@
      */
 #define	CALL	(0xc0000000)
 
+void sparc_find_call PARAMS ((Sym *, bfd_vma, bfd_vma));
+
 void
 sparc_find_call (parent, p_lowpc, p_highpc)
      Sym *parent;
Index: gprof/tahoe.c
===================================================================
RCS file: /cvs/src/src/gprof/tahoe.c,v
retrieving revision 1.4
diff -u -p -r1.4 tahoe.c
--- tahoe.c	2001/03/14 03:14:56	1.4
+++ tahoe.c	2001/08/09 13:55:40
@@ -46,6 +46,11 @@ typedef enum tahoe_opermodes tahoe_opera
  */
 Sym indirectchild;
 
+tahoe_operandenum tahoe_operandmode PARAMS ((unsigned char *));
+char *tahoe_operandname PARAMS ((tahoe_operandenum));
+long tahoe_operandlength PARAMS ((unsigned char *));
+bfd_vma tahoe_reladdr PARAMS ((char *));
+void tahoe_find_call PARAMS ((Sym *, bfd_vma, bfd_vma));
 
 tahoe_operandenum
 tahoe_operandmode (modep)
Index: gprof/vax.c
===================================================================
RCS file: /cvs/src/src/gprof/vax.c,v
retrieving revision 1.4
diff -u -p -r1.4 vax.c
--- vax.c	2001/03/14 03:14:56	1.4
+++ vax.c	2001/08/09 13:55:40
@@ -53,6 +53,12 @@ struct modebyte
 Sym indirectchild;
 
 
+static operandenum vax_operandmode PARAMS ((struct modebyte *));
+static char *vax_operandname PARAMS ((operandenum));
+static long vax_operandlength PARAMS ((struct modebyte *));
+static bfd_vma vax_reladdr PARAMS ((struct modebyte *));
+void vax_find_call PARAMS ((Sym *, bfd_vma, bfd_vma));
+
 static operandenum
 vax_operandmode (modep)
      struct modebyte *modep;



More information about the Binutils mailing list