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]

Patch installed for ISO/GNU C conversion of sparc/gmon-sol2.c


Since config/sparc/gmon-sol2.c is a target file, like libgcc2.c, I
converted it to ISO/GNU C.

Tested on sparc-sun-solaris2.7 with cc for stage1 and installed as
obvious.


2003-01-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* config/sparc/gmon-sol2.c (moncontrol, monstartup, _mcleanup,
	internal_mcount): Don't use PARAMS.
	(monstartup, _mcleanup, internal_mcount, moncontrol): Convert to
	ISO C style.
	(internal_mcount): Use __attribute__, not ATTRIBUTE_UNUSED.
	
diff -rup orig/egcc-CVS20030111/gcc/config/sparc/gmon-sol2.c egcc-CVS20030111/gcc/config/sparc/gmon-sol2.c
--- orig/egcc-CVS20030111/gcc/config/sparc/gmon-sol2.c	2003-01-05 00:24:58.000000000 -0500
+++ egcc-CVS20030111/gcc/config/sparc/gmon-sol2.c	2003-01-11 21:54:48.937418054 -0500
@@ -88,13 +88,11 @@ static int	s_scale;
 
 #define	MSG "No space for profiling buffer(s)\n"
 
-static void moncontrol	PARAMS ((int));
-extern void monstartup	PARAMS ((char *, char *));
-extern void _mcleanup	PARAMS ((void));
-
-void monstartup(lowpc, highpc)
-    char	*lowpc;
-    char	*highpc;
+static void moncontrol (int);
+extern void monstartup (char *, char *);
+extern void _mcleanup (void);
+
+void monstartup(char *lowpc, char *highpc)
 {
     int			monsize;
     char		*buffer;
@@ -170,7 +168,7 @@ void monstartup(lowpc, highpc)
 }
 
 void
-_mcleanup()
+_mcleanup(void)
 {
     int			fd;
     int			fromindex;
@@ -269,7 +267,8 @@ _mcleanup()
  * -- [eichin:19920702.1107EST]
  */
 
-static void internal_mcount PARAMS ((char *, unsigned short *)) ATTRIBUTE_UNUSED;
+static void internal_mcount (char *, unsigned short *)
+     __attribute__ ((__unused__));
 
 /* i7 == last ret, -> frompcindex */
 /* o7 == current ret, -> selfpc */
@@ -278,9 +277,7 @@ asm(".global _mcount; _mcount: mov %i7,%
 /* This is for compatibility with old versions of gcc which used mcount.  */
 asm(".global mcount; mcount: mov %i7,%o1; mov %o7,%o0;b,a internal_mcount");
 
-static void internal_mcount(selfpc, frompcindex)
-	register char			*selfpc;
-	register unsigned short		*frompcindex;
+static void internal_mcount(char *selfpc, unsigned short *frompcindex)
 {
 	register struct tostruct	*top;
 	register struct tostruct	*prevtop;
@@ -410,8 +407,7 @@ overflow:
  *	profiling is what mcount checks to see if
  *	all the data structures are ready.
  */
-static void moncontrol(mode)
-    int mode;
+static void moncontrol(int mode)
 {
     if (mode) {
 	/* start */


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