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]

[patch] unused functions in toplev.c.


Hi,

I found two unused functions in toplev.c.  OK to apply?

Tested to build h8300-hms-gcc.

Thanks,

Kazu Hirata

2001-02-11  Kazu Hirata  <kazu@hxi.com>

	* toplev.c (push_float_handler): Remove.
	(pop_float_handler): Remove.
	* toplev.h: Remove prototypes for the above functions.

Index: toplev.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/toplev.c,v
retrieving revision 1.420
diff -u -r1.420 toplev.c
--- toplev.c	2001/02/04 22:43:57	1.420
+++ toplev.c	2001/02/12 04:22:59
@@ -1662,38 +1662,6 @@
   return 1;
 }
 
-/* Specify, in HANDLER, where to longjmp to when a floating arithmetic
-   error happens, pushing the previous specification into OLD_HANDLER.
-   Return an indication of whether there was a previous handler in effect.  */
-
-int
-push_float_handler (handler, old_handler)
-     jmp_buf handler, old_handler;
-{
-  int was_handled = float_handled;
-
-  float_handled = 1;
-  if (was_handled)
-    memcpy ((char *) old_handler, (char *) float_handler,
-	   sizeof (float_handler));
-
-  memcpy ((char *) float_handler, (char *) handler, sizeof (float_handler));
-  return was_handled;
-}
-
-/* Restore the previous specification of whether and where to longjmp to
-   when a floating arithmetic error happens.  */
-
-void
-pop_float_handler (handled, handler)
-     int handled;
-     jmp_buf handler;
-{
-  float_handled = handled;
-  if (handled)
-    bcopy ((char *) handler, (char *) float_handler, sizeof (float_handler));
-}
-
 /* Handler for fatal signals, such as SIGSEGV.  These are transformed
    into ICE messages, which is much more user friendly.  */
 
Index: toplev.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/toplev.h,v
retrieving revision 1.52
diff -u -r1.52 toplev.h
--- toplev.h	2001/02/04 22:43:58	1.52
+++ toplev.h	2001/02/12 04:22:59
@@ -108,8 +108,6 @@
 					       ATTRIBUTE_PRINTF_2;
 #if defined (_JBLEN) || defined (setjmp)
 extern void set_float_handler PARAMS ((jmp_buf));
-extern int push_float_handler PARAMS ((jmp_buf, jmp_buf));
-extern void pop_float_handler PARAMS ((int, jmp_buf));
 #endif
 extern int do_float_handler PARAMS ((void (*) (PTR), PTR));
 


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