This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH m68k] Fix TRANSFER_FROM_TRAMPOLINE for -Werror
- From: Gunther Nikl <gni at gecko dot de>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Bernardo Innocenti <bernie at develer dot com>, Richard Henderson <rth at redhat dot com>
- Date: Mon, 3 Nov 2003 18:00:49 +0100
- Subject: [PATCH m68k] Fix TRANSFER_FROM_TRAMPOLINE for -Werror
Hello!
m68k.h/TRANSFER_FROM_TRAMPOLINE breaks with -Werror because the function
it defines has no prototype, there is no void in the argumentlist and an
unitialized usage warning (which is a false one). The attached patch tries
to address all issues.
Gunther
-- cut --
2003-11-03 Gunther Nikl <gni@gecko.de>
* config/m68k/m68k.h (TRANSFER_FROM_TRAMPOLINE): Add prototype and
use C90 declaration for __transfer_from_trampoline; Fix
uninitialized variable warning.
--- m68k.h~ Mon Nov 3 12:14:03 2003
+++ m68k.h Mon Nov 3 12:14:03 2003
@@ -1068,10 +1068,11 @@ struct m68k_args
The function definition just permits use of "asm with operands"
(though the operand list is empty). */
#define TRANSFER_FROM_TRAMPOLINE \
+extern void __transfer_from_trampoline (void); \
void \
-__transfer_from_trampoline () \
+__transfer_from_trampoline (void) \
{ \
- register char *a0 asm ("%a0"); \
+ register char *a0 asm ("%a0") = a0; \
asm (GLOBAL_ASM_OP "___trampoline"); \
asm ("___trampoline:"); \
asm volatile ("move%.l %0,%@" : : "m" (a0[22])); \
-- cut --