]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Make qsort compare function type correct
authorMichael Meissner <meissner@cygnus.com>
Wed, 11 Mar 1998 13:18:30 +0000 (13:18 +0000)
committerMichael Meissner <meissner@gcc.gnu.org>
Wed, 11 Mar 1998 13:18:30 +0000 (13:18 +0000)
From-SVN: r18483

gcc/ChangeLog
gcc/haifa-sched.c
gcc/sched.c

index cb234fce105f06370cf25feee66aae2525295874..39c73e7f20ffe76e7974f588c7717ccd6f88d532 100644 (file)
@@ -1,3 +1,8 @@
+Wed Mar 11 15:16:01 1998  Michael Meissner  <meissner@cygnus.com>
+
+       * {haifa-,}sched.c (rank_for_schedule): Only take void * arguments
+       as per ISO C spec.
+
 Wed Mar 11 12:05:20 1998  Teemu Torma  <tot@trema.com>
 
        * gthr.h: Changed the comment about return values.
index 264e4226fa02b9ff44edec5756dde5f53bcdb117..be87cc224cbc1cfe19431ef29a3053ff463b9c00 100644 (file)
@@ -458,7 +458,7 @@ static void sched_analyze_2 PROTO ((rtx, rtx));
 static void sched_analyze_insn PROTO ((rtx, rtx, rtx));
 static void sched_analyze PROTO ((rtx, rtx));
 static void sched_note_set PROTO ((rtx, int));
-static int rank_for_schedule PROTO ((rtx *, rtx *));
+static int rank_for_schedule PROTO ((const GENERIC_PTR, const GENERIC_PTR));
 static void swap_sort PROTO ((rtx *, int));
 static void queue_insn PROTO ((rtx, int));
 static int schedule_insn PROTO ((rtx, rtx *, int, int));
@@ -3992,10 +3992,11 @@ while (0)
 
 static int
 rank_for_schedule (x, y)
-     rtx *x, *y;
+     const GENERIC_PTR x;
+     const GENERIC_PTR y;
 {
-  rtx tmp = *y;
-  rtx tmp2 = *x;
+  rtx tmp = *(rtx *)y;
+  rtx tmp2 = *(rtx *)x;
   rtx link;
   int tmp_class, tmp2_class;
   int val, priority_val, spec_val, prob_val, weight_val;
index 3ba20b811a56c6ff7a84ccab309f73385f5cbe3d..f2ee7edcae837639c095f426b3575b7e6899ef41 100644 (file)
@@ -322,7 +322,7 @@ static void sched_analyze_2         PROTO((rtx, rtx));
 static void sched_analyze_insn         PROTO((rtx, rtx, rtx));
 static int sched_analyze               PROTO((rtx, rtx));
 static void sched_note_set             PROTO((int, rtx, int));
-static int rank_for_schedule           PROTO((rtx *, rtx *));
+static int rank_for_schedule           PROTO((const GENERIC_PTR, const GENERIC_PTR));
 static void swap_sort                  PROTO((rtx *, int));
 static void queue_insn                 PROTO((rtx, int));
 static int birthing_insn_p             PROTO((rtx));
@@ -1860,10 +1860,11 @@ sched_note_set (b, x, death)
 
 static int
 rank_for_schedule (x, y)
-     rtx *x, *y;
+     const GENERIC_PTR x;
+     const GENERIC_PTR y;
 {
-  rtx tmp = *y;
-  rtx tmp2 = *x;
+  rtx tmp = *(rtx *)y;
+  rtx tmp2 = *(rtx *)x;
   rtx link;
   int tmp_class, tmp2_class;
   int value;