This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Changes to function.c made "return" mandatory. PATCH to fix it.
- To: gcc-patches at gcc dot gnu dot org
- Subject: Changes to function.c made "return" mandatory. PATCH to fix it.
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- Date: Mon, 7 Feb 2000 19:47:51 -0500 (EST)
Doh! Didn't use the nickname and managed to misspell the list name.
---------- Forwarded message ----------
Date: Mon, 7 Feb 2000 19:43:50 -0500 (EST)
From: Hans-Peter Nilsson <hp@bitrange.com>
To: rth@cygnus.com
Cc: gcc-pathes@gcc.gnu.org
Subject: Changes to function.c made "return" mandatory. PATCH to fix it.
Hi.
Your new function emit_return_into_block, added between 1.153 and
1.156 to function.c uses "gen_return" without encapsulating it in #ifdef
HAVE_return, making "return" a mandatory pattern. This is not what it
used to be and the manual sys "return" is an optional pattern.
Boo-hoo. :-)
I use the following patch (slightly edited to remove other stuff).
Ok to commit?
Tue Feb 8 01:39:45 2000 Hans-Peter Nilsson <hp@bitrange.com>
* function.c (emit_return_into_block): Wrap in #ifdef HAVE_return.
Index: function.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/function.c,v
retrieving revision 1.156
diff -p -c -r1.156 function.c
*** function.c 2000/02/07 17:39:40 1.156
--- function.c 2000/02/08 00:38:01
*************** static int all_blocks PARAMS ((tree, tr
*** 271,277 ****
--- 271,279 ----
can always export `prologue_epilogue_contains'. */
static int *record_insns PARAMS ((rtx)) ATTRIBUTE_UNUSED;
static int contains PARAMS ((rtx, int *));
+ #ifdef HAVE_return
static void emit_return_into_block PARAMS ((basic_block));
+ #endif
static void put_addressof_into_stack PARAMS ((rtx, struct hash_table *));
static boolean purge_addressof_1 PARAMS ((rtx *, rtx, int, int,
struct hash_table *));
*************** prologue_epilogue_contains (insn)
*** 6581,6586 ****
--- 6577,6583 ----
return 0;
}
+ #ifdef HAVE_return
/* Insert gen_return at the end of block BB. This also means updating
block_for_insn appropriately. */
*************** emit_return_into_block (bb)
*** 6601,6606 ****
--- 6598,6604 ----
}
bb->end = end;
}
+ #endif /* HAVE_return */
/* Generate the prologue and epilogue RTL if the machine supports it. Thread
this into place with notes indicating where the prologue ends and where
brgds, H-P