This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Remove lang_eh_type_covers, which is dead
On 12/04/10 18:15, Eric Botcazou wrote:
Remove lang_eh_type_covers which is unused (the Ada front-end assigns
gnat_eh_type_covers to it, but no use is made of this). OK to apply?
The gigi part is OK but not the ChangeLog, see ada/ChangeLog for references.
Like this?
Ciao,
Duncan.
Index: mainline/gcc/ada/gcc-interface/misc.c
===================================================================
--- mainline.orig/gcc/ada/gcc-interface/misc.c 2010-04-10 13:46:05.893971401 +0200
+++ mainline/gcc/ada/gcc-interface/misc.c 2010-04-12 17:44:48.238419365 +0200
@@ -74,7 +74,6 @@
static const char *gnat_printable_name (tree, int);
static const char *gnat_dwarf_name (tree, int);
static tree gnat_return_tree (tree);
-static int gnat_eh_type_covers (tree, tree);
static void gnat_parse_file (int);
static void internal_error_function (const char *, va_list *);
static tree gnat_type_max_size (const_tree);
@@ -434,8 +433,6 @@
right exception regions. */
using_eh_for_cleanups ();
- lang_eh_type_covers = gnat_eh_type_covers;
-
/* Turn on -fexceptions and -fnon-call-exceptions. The first one triggers
the generation of the necessary exception runtime tables. The second one
is useful for two reasons: 1/ we map some asynchronous signals like SEGV
@@ -580,20 +577,6 @@
return t;
}
-/* Return true if type A catches type B. Callback for flow analysis from
- the exception handling part of the back-end. */
-
-static int
-gnat_eh_type_covers (tree a, tree b)
-{
- /* a catches b if they represent the same exception id or if a
- is an "others".
-
- ??? integer_zero_node for "others" is hardwired in too many places
- currently. */
- return (a == b || a == integer_zero_node);
-}
-
/* Get the alias set corresponding to a type or expression. */
static alias_set_type
Index: mainline/gcc/ada/gcc-interface/trans.c
===================================================================
--- mainline.orig/gcc/ada/gcc-interface/trans.c 2010-04-12 17:37:52.548462835 +0200
+++ mainline/gcc/ada/gcc-interface/trans.c 2010-04-12 17:44:48.258417427 +0200
@@ -3233,11 +3233,7 @@
handler can catch, with special cases for others and all others cases.
Each exception type is actually identified by a pointer to the exception
- id, or to a dummy object for "others" and "all others".
-
- Care should be taken to ensure that the control flow impact of "others"
- and "all others" is known to GCC. lang_eh_type_covers is doing the trick
- currently. */
+ id, or to a dummy object for "others" and "all others". */
for (gnat_temp = First (Exception_Choices (gnat_node));
gnat_temp; gnat_temp = Next (gnat_temp))
{
Index: mainline/gcc/except.c
===================================================================
--- mainline.orig/gcc/except.c 2010-04-10 13:46:05.943942063 +0200
+++ mainline/gcc/except.c 2010-04-12 17:44:48.258417427 +0200
@@ -153,9 +153,6 @@
to the given failure handler. */
tree (*lang_protect_cleanup_actions) (void);
-/* Return true if type A catches type B. */
-int (*lang_eh_type_covers) (tree a, tree b);
-
static GTY(()) int call_site_base;
static GTY ((param_is (union tree_node)))
htab_t type_to_runtime_map;
Index: mainline/gcc/except.h
===================================================================
--- mainline.orig/gcc/except.h 2010-04-10 13:46:05.873942391 +0200
+++ mainline/gcc/except.h 2010-04-12 17:44:48.278444684 +0200
@@ -294,9 +294,6 @@
FUNCTION_DECL for `std::terminate'. */
extern tree (*lang_protect_cleanup_actions) (void);
-/* Return true if type A catches type B. */
-extern int (*lang_eh_type_covers) (tree a, tree b);
-
/* Just because the user configured --with-sjlj-exceptions=no doesn't
mean that we can use call frame exceptions. Detect that the target
Index: mainline/gcc/ChangeLog
===================================================================
--- mainline.orig/gcc/ChangeLog 2010-04-12 17:45:39.590926756 +0200
+++ mainline/gcc/ChangeLog 2010-04-12 18:37:58.828425463 +0200
@@ -1,3 +1,8 @@
+2010-04-12 Duncan Sands <baldrick@free.fr>
+
+ * except.h (lang_eh_type_covers): Remove.
+ * except.c (lang_eh_type_covers): Likewise.
+
2010-04-12 Richard Guenther <rguenther@suse.de>
* gsstruct.def (GSS_CALL): New.
Index: mainline/gcc/ada/ChangeLog
===================================================================
--- mainline.orig/gcc/ada/ChangeLog 2010-04-12 18:36:24.028447142 +0200
+++ mainline/gcc/ada/ChangeLog 2010-04-12 18:38:24.468448859 +0200
@@ -1,3 +1,8 @@
+2010-04-12 Duncan Sands <baldrick@free.fr>
+
+ * gcc-interface/misc.c (gnat_eh_type_covers): Remove.
+ * gcc-interface/trans.c (Exception_Handler_to_gnu_zcx): Update comment.
+
2010-04-12 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (Identifier_to_gnu): Use boolean variable.