This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
rs6000.h warning fix
- To: gcc-patches at gcc dot gnu dot org
- Subject: rs6000.h warning fix
- From: Geoff Keating <geoffk at cygnus dot com>
- Date: Thu, 7 Sep 2000 21:56:48 -0700
This squishes most of the warnings from the rs6000 backend.
The rs6000.h change was bootstrapped & tested on powerpc-linux CVS as
of yesterday with Bernd's CSE patch removed; the sol-c0.c change was
tested by just running 'make' and checking that the file still builds.
--
- Geoffrey Keating <geoffk@cygnus.com>
===File ~/patches/cygnus/rs6000-argsizewarn.patch===========
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ChangeLog,v
retrieving revision 1.7658
diff -p -u -u -p -r1.7658 ChangeLog
--- ChangeLog 2000/09/08 02:46:39 1.7658
+++ ChangeLog 2000/09/08 04:55:15
@@ -1,3 +1,10 @@
+2000-09-07 Geoff Keating <geoffk@cygnus.com>
+
+ * config/rs6000/sol-c0.c (_start): Declare `termfunc' parameter
+ with a prototype.
+ * config/rs6000/rs6000.h (RS6000_ARG_SIZE): Use cast to suppress
+ warning.
+
Fri Sep 8 03:26:38 2000 J"orn Rennecke <amylaar@redhat.co.uk>
* sh.md (cmpeqsi_ior_t, cmpeqsi_and_t): Remove.
Index: config/rs6000/rs6000.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/rs6000/rs6000.h,v
retrieving revision 1.92
diff -p -u -u -p -r1.92 rs6000.h
--- rs6000.h 2000/09/06 09:12:51 1.92
+++ rs6000.h 2000/09/08 04:55:24
@@ -1423,8 +1423,9 @@ typedef struct rs6000_args
#define RS6000_ARG_SIZE(MODE, TYPE, NAMED) \
(! (NAMED) ? 0 \
: (MODE) != BLKmode \
- ? (GET_MODE_SIZE (MODE) + (UNITS_PER_WORD - 1)) / UNITS_PER_WORD \
- : (int_size_in_bytes (TYPE) + (UNITS_PER_WORD - 1)) / UNITS_PER_WORD)
+ ? (GET_MODE_SIZE (MODE) + (UNITS_PER_WORD - 1)) / UNITS_PER_WORD \
+ : ((unsigned HOST_WIDE_INT) int_size_in_bytes (TYPE) \
+ + (UNITS_PER_WORD - 1)) / UNITS_PER_WORD)
/* Initialize a variable CUM of type CUMULATIVE_ARGS
for a call to a function whose data type is FNTYPE.
Index: config/rs6000/sol-c0.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/rs6000/sol-c0.c,v
retrieving revision 1.4
diff -p -u -u -p -r1.4 sol-c0.c
--- sol-c0.c 2000/08/14 05:59:50 1.4
+++ sol-c0.c 2000/09/08 04:55:25
@@ -33,7 +33,7 @@ extern int atexit (void (*__func) (void)
extern void __init (void) __attribute__ ((__longcall__));
extern void __fini (void) __attribute__ ((__longcall__));
extern void _start(int argc, char *argv[], char *envp[], void *auxp,
- void (*termfunc)());
+ void (*termfunc)(void));
extern void exit(int);
extern int main (int argc, char *argv[], char *envp[], void *auxp);
@@ -84,7 +84,8 @@ deregister (void)
/* Start function. */
void
-_start(int argc, char *argv[], char *envp[], void *auxp, void (*termfunc)())
+_start(int argc, char *argv[], char *envp[], void *auxp,
+ void (*termfunc)(void))
{
int ret;
int dummy = 0;
============================================================