summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/genattr.c9
2 files changed, 10 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index cb4a5698973..6cea952383b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+Wed Aug 25 09:44:43 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * genattr.c (gen_attr): Add prototype arguments for get_attr_*().
+ Remove unused prototype for `init_lengths'.
+
Wed Aug 25 09:32:31 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* calls.c (emit_call_1): Mark parameter `stack_size' with
diff --git a/gcc/genattr.c b/gcc/genattr.c
index 86c078f46de..35bc4b221bc 100644
--- a/gcc/genattr.c
+++ b/gcc/genattr.c
@@ -101,12 +101,14 @@ gen_attr (attr)
rtx attr;
{
char *p;
+ int is_const = GET_CODE (XEXP (attr, 2)) == CONST;
printf ("#define HAVE_ATTR_%s\n", XSTR (attr, 0));
/* If numeric attribute, don't need to write an enum. */
if (*XSTR (attr, 1) == '\0')
- printf ("extern int get_attr_%s ();\n", XSTR (attr, 0));
+ printf ("extern int get_attr_%s PROTO((%s));\n", XSTR (attr, 0),
+ (is_const ? "void" : "rtx"));
else
{
printf ("enum attr_%s {", XSTR (attr, 0));
@@ -128,15 +130,14 @@ gen_attr (attr)
}
printf ("};\n");
- printf ("extern enum attr_%s get_attr_%s ();\n\n",
- XSTR (attr, 0), XSTR (attr, 0));
+ printf ("extern enum attr_%s get_attr_%s PROTO((%s));\n\n",
+ XSTR (attr, 0), XSTR (attr, 0), (is_const ? "void" : "rtx"));
}
/* If `length' attribute, write additional function definitions and define
variables used by `insn_current_length'. */
if (! strcmp (XSTR (attr, 0), "length"))
{
- printf ("extern void init_lengths ();\n");
printf ("extern void shorten_branches PROTO((rtx));\n");
printf ("extern int insn_default_length PROTO((rtx));\n");
printf ("extern int insn_variable_length_p PROTO((rtx));\n");