From 6a728a2da39759f1168fc9a85914440bdef1deb6 Mon Sep 17 00:00:00 2001
From: Steven Bosscher <stevenb.gcc@gmail.com>
Date: Tue, 30 May 2006 11:09:18 +0000
Subject: [PATCH] m32r.h (DBX_OUTPUT_SOURCE_LINE): Fix type of begin_label.

* config/m32r/m32r.h (DBX_OUTPUT_SOURCE_LINE): Fix type of begin_label.
* config/m32r/initfini.c (__do_global_dtors, __do_global_ctors):
    Make prototypes ISO C90.

From-SVN: r114232
---
 gcc/ChangeLog              |  6 ++++
 gcc/config/m32r/initfini.c | 58 +++++++++++++++++++-------------------
 gcc/config/m32r/m32r.h     |  5 ++--
 3 files changed, 38 insertions(+), 31 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9c4865365396..f67a7c2867e0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2006-05-30  Steven Bosscher  <stevenb.gcc@gmail.com>
+
+	* config/m32r/m32r.h (DBX_OUTPUT_SOURCE_LINE): Fix type of begin_label.
+	* config/m32r/initfini.c (__do_global_dtors, __do_global_ctors):
+	Make prototypes ISO C90.
+
 2006-05-30  Mircea Namolaru  <namolaru@il.ibm.com>
             Leehod Baruch    <leehod.baruch@weizmann.ac.il>
 
diff --git a/gcc/config/m32r/initfini.c b/gcc/config/m32r/initfini.c
index 84bdc13fa451..ecee1c80591b 100644
--- a/gcc/config/m32r/initfini.c
+++ b/gcc/config/m32r/initfini.c
@@ -1,33 +1,33 @@
 /* .init/.fini section handling + C++ global constructor/destructor handling.
    This file is based on crtstuff.c, sol2-crti.asm, sol2-crtn.asm.
 
-Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-In addition to the permissions in the GNU General Public License, the
-Free Software Foundation gives you unlimited permission to link the
-compiled version of this file into combinations with other programs,
-and to distribute those combinations without any restriction coming
-from the use of this file.  (The General Public License restrictions
-do apply in other respects; for example, they cover modification of
-the file, and distribution when not linked into a combine
-executable.)
-
-GCC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING.  If not, write to
-the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-Boston, MA 02110-1301, USA.  */
+   Copyright (C) 1996, 1997, 1998, 2006 Free Software Foundation, Inc.
+
+   This file is part of GCC.
+
+   GCC is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   In addition to the permissions in the GNU General Public License, the
+   Free Software Foundation gives you unlimited permission to link the
+   compiled version of this file into combinations with other programs,
+   and to distribute those combinations without any restriction coming
+   from the use of this file.  (The General Public License restrictions
+   do apply in other respects; for example, they cover modification of
+   the file, and distribution when not linked into a combine
+   executable.)
+
+   GCC is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with GCC; see the file COPYING.  If not, write to
+   the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.  */
 
 /*  Declare a pointer to void function type.  */
 typedef void (*func_ptr) (void);
@@ -72,7 +72,7 @@ static void __do_global_dtors (void)
 asm ("__do_global_dtors") __attribute__ ((used, section (".text")));
 
 static void
-__do_global_dtors ()
+__do_global_dtors (void)
 {
   func_ptr *p;
 
@@ -137,7 +137,7 @@ static void __do_global_ctors (void)
 asm ("__do_global_ctors") __attribute__ ((used, section (".text")));
 
 static void
-__do_global_ctors ()
+__do_global_ctors (void)
 {
   func_ptr *p;
 
diff --git a/gcc/config/m32r/m32r.h b/gcc/config/m32r/m32r.h
index d2bc85b0da64..beef7c9d395b 100644
--- a/gcc/config/m32r/m32r.h
+++ b/gcc/config/m32r/m32r.h
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler, Renesas M32R cpu.
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-   2005 Free Software Foundation, Inc.
+   2005, 2006 Free Software Foundation, Inc.
 
    This file is part of GCC.
 
@@ -1372,7 +1372,8 @@ L2:     .word STATIC
 #define DBX_OUTPUT_SOURCE_LINE(file, line, counter)			\
   do									\
     {									\
-      rtx begin_label = XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0);\
+      const char * begin_label =					\
+	XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0);		\
       char label[64];							\
       ASM_GENERATE_INTERNAL_LABEL (label, "LM", counter);		\
 									\
-- 
GitLab