This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

recog.c apply_change_group ret zero if num_changes is 0.


All,

I noticed that if apply_change_group is called and num_changes is zero
then 1 is returned. I think it makes more sense to return 0 if no
changes are outstanding.

Bootstrapped i686-pc-linux-gnu all languages including ada no regressions.

ChangeLog

	* recog.c (apply_change_group): Return zero if no changes.

Graham

-------------------------------------------------------------------
Index: gcc/recog.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/recog.c,v
retrieving revision 1.160
diff -c -p -r1.160 recog.c
*** gcc/recog.c 28 Jun 2002 15:43:53 -0000      1.160
--- gcc/recog.c 13 Jul 2002 12:19:25 -0000
*************** apply_change_group ()
*** 317,322 ****
--- 317,326 ----
    int i;
    rtx last_validated = NULL_RTX;

+   /* If no changes return zero.  */
+   if (num_changes == 0)
+     return 0;
+
    /* The changes have been applied and all INSN_CODEs have been reset to force
       rerecognition.

----------------------------------------------------------------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]