Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Committed: fix sim/cr16/interp.c hash prototype
@ 2008-07-11  1:35 Hans-Peter Nilsson
  2008-07-11  8:52 ` M R Swami Reddy
  0 siblings, 1 reply; 3+ messages in thread
From: Hans-Peter Nilsson @ 2008-07-11  1:35 UTC (permalink / raw)
  To: gdb-patches; +Cc: MR.Swami.Reddy

While cleaning up the recently introduced -lz mess in sim, I
found that the cr16 sim didn't compile for me (gcc-4.0.2-8.fc4):

gcc -c -DHAVE_CONFIG_H     -DPROFILE=1 -DWITH_PROFILE=-1          -DDEFAULT_INLINE=0       -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith -Wuninitialized    -DNEED_UI_LOOP_HOOK -DSIM_HAVE_ENVIRONMENT   -I. -I/home/hp/combined/sim_write/src/sim/cr16 -I../common -I/home/hp/combined/sim_write/src/sim/cr16/../common -I../../include -I/home/hp/combined/sim_write/src/sim/cr16/../../include -I../../bfd -I/home/hp/combined/sim_write/src/sim/cr16/../../bfd -I../../opcodes -I/home/hp/combined/sim_write/src/sim/cr16/../../opcodes  -g -O2 /home/hp/combined/sim_write/src/sim/cr16/interp.c
x/src/sim/cr16/interp.c:96: error: conflicting types for `hash'
x/src/sim/cr16/interp.c:53: error: previous declaration of `hash' here
x/src/sim/cr16/interp.c: In function `do_run':
x/src/sim/cr16/interp.c:400: warning: comparison between pointer and integer
make[3]: *** [interp.o] Error 1

As the prototype isn't required, I fixed it thus, committed:

sim/cr16:
	* interp.c (hash): Remove incorrect prototype.

Index: interp.c
===================================================================
RCS file: /cvs/src/src/sim/cr16/interp.c,v
retrieving revision 1.2
diff -p -u -r1.2 interp.c
--- interp.c	5 May 2008 09:19:42 -0000	1.2
+++ interp.c	11 Jul 2008 01:29:02 -0000
@@ -50,7 +50,6 @@ asection *text;
 bfd_vma text_start;
 bfd_vma text_end;
 
-static long hash PARAMS ((uint64 linsn, int));
 static struct hash_entry *lookup_hash PARAMS ((uint64 ins, int size));
 static void get_operands PARAMS ((operand_desc *s, uint64 mcode, int isize, int nops));
 static int do_run PARAMS ((uint64 mc));

brgds, H-P


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-07-11 10:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-11  1:35 Committed: fix sim/cr16/interp.c hash prototype Hans-Peter Nilsson
2008-07-11  8:52 ` M R Swami Reddy
2008-07-11 10:49   ` Hans-Peter Nilsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox