public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
* (patch) stop generating code that uses old style arguments
@ 2016-04-14 14:41 Trevor Saunders
  2016-04-14 14:44 ` Frank Ch. Eigler
  0 siblings, 1 reply; 2+ messages in thread
From: Trevor Saunders @ 2016-04-14 14:41 UTC (permalink / raw)
  To: cgen

Hi,

I wanted to enable -Wold-style-{declaration,definition} for all of
binutils, and ran into cgen generating that style of definition, so
here's a patch to fix that.

Trev

ChangeLog:

2016-04-14  Trevor Saunders  <tbsaunde@tbsaunde.org>

        * opc-itab.scm (asm_hash_insn_p): Stop using old style arguments.
	(dis_hash_insn_p): Likewise.
	(asm_hash_insn): Likewise.
	(dis_hash_insn): Likewise.
        * opc-opinst.scm (@arch@_cgen_init_opinst_table): Likewise.

Index: opc-itab.scm
===================================================================
RCS file: /cvs/src/src/cgen/opc-itab.scm,v
retrieving revision 1.18
diff -u -p -r1.18 opc-itab.scm
--- opc-itab.scm	3 Nov 2009 16:24:02 -0000	1.18
+++ opc-itab.scm	14 Apr 2016 14:32:21 -0000
@@ -412,15 +412,13 @@ static const CGEN_OPCODE @arch@_cgen_ins
    Targets are free to override CGEN_{ASM,DIS}_HASH_P in the .opc file.  */
 
 static int
-asm_hash_insn_p (insn)
-     const CGEN_INSN *insn ATTRIBUTE_UNUSED;
+asm_hash_insn_p (const CGEN_INSN *insn ATTRIBUTE_UNUSED)
 {
   return CGEN_ASM_HASH_P (insn);
 }
 
 static int
-dis_hash_insn_p (insn)
-     const CGEN_INSN *insn;
+dis_hash_insn_p (const CGEN_INSN *insn)
 {
   /* If building the hash table and the NO-DIS attribute is present,
      ignore.  */
@@ -452,8 +450,7 @@ dis_hash_insn_p (insn)
    Targets are free to override CGEN_{ASM,DIS}_HASH in the .opc file.  */
 
 static unsigned int
-asm_hash_insn (mnem)
-     const char * mnem;
+asm_hash_insn (const char *mnem)
 {
   return CGEN_ASM_HASH (mnem);
 }
@@ -462,9 +459,8 @@ asm_hash_insn (mnem)
    VALUE is the first base_insn_bitsize bits as an int in host order.  */
 
 static unsigned int
-dis_hash_insn (buf, value)
-     const char * buf ATTRIBUTE_UNUSED;
-     CGEN_INSN_INT value ATTRIBUTE_UNUSED;
+dis_hash_insn (const char *buf ATTRIBUTE_UNUSED,
+		     CGEN_INSN_INT value ATTRIBUTE_UNUSED)
 {
   return CGEN_DIS_HASH (buf, value);
 }
Index: opc-opinst.scm
===================================================================
RCS file: /cvs/src/src/cgen/opc-opinst.scm,v
retrieving revision 1.8
diff -u -p -r1.8 opc-opinst.scm
--- opc-opinst.scm	5 Nov 2009 16:55:33 -0000	1.8
+++ opc-opinst.scm	14 Apr 2016 14:32:21 -0000
@@ -117,8 +117,7 @@
 /* Function to call before using the operand instance table.  */
 
 void
-@arch@_cgen_init_opinst_table (cd)
-     CGEN_CPU_DESC cd;
+@arch@_cgen_init_opinst_table (CGEN_CPU_DESC cd)
 {
   int i;
   const CGEN_OPINST **oi = & @arch@_cgen_opinst_table[0];

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

* Re: (patch) stop generating code that uses old style arguments
  2016-04-14 14:41 (patch) stop generating code that uses old style arguments Trevor Saunders
@ 2016-04-14 14:44 ` Frank Ch. Eigler
  0 siblings, 0 replies; 2+ messages in thread
From: Frank Ch. Eigler @ 2016-04-14 14:44 UTC (permalink / raw)
  To: Trevor Saunders; +Cc: cgen

Hi -

> I wanted to enable -Wold-style-{declaration,definition} for all of
> binutils, and ran into cgen generating that style of definition, so
> here's a patch to fix that.

Looks good; are you able to commit?

- FChE

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

end of thread, other threads:[~2016-04-14 14:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-14 14:41 (patch) stop generating code that uses old style arguments Trevor Saunders
2016-04-14 14:44 ` Frank Ch. Eigler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).