public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: Trevor Saunders <tbsaunde@tbsaunde.org>
To: cgen@sourceware.org
Subject: (patch) stop generating code that uses old style arguments
Date: Thu, 14 Apr 2016 14:41:00 -0000	[thread overview]
Message-ID: <20160414144606.GB9695@ball> (raw)

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];

             reply	other threads:[~2016-04-14 14:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-14 14:41 Trevor Saunders [this message]
2016-04-14 14:44 ` Frank Ch. Eigler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160414144606.GB9695@ball \
    --to=tbsaunde@tbsaunde.org \
    --cc=cgen@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).