This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Ada] Replace calls to abort with gcc_unreachable in Gigi
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 23 Oct 2007 19:37:18 +0200
- Subject: [Ada] Replace calls to abort with gcc_unreachable in Gigi
Spotted in the course of the recent discussion with Richard G.
Tested on i586-suse-linux, applied on the mainline.
2007-10-23 Eric Botcazou <ebotcazou@adacore.com>
* misc.c (gnat_handle_option): Replace call to abort with
call to gcc_unreachable.
(gnat_init): Likewise.
(gnat_expand_expr): Likewise.
(fp_prec_to_size): Likewise.
(fp_size_to_prec): Likewise.
--
Eric Botcazou
Index: misc.c
===================================================================
--- misc.c (revision 129556)
+++ misc.c (working copy)
@@ -264,9 +264,6 @@ gnat_handle_option (size_t scode, const
switch (code)
{
- default:
- abort ();
-
case OPT_I:
q = xmalloc (sizeof("-I") + strlen (arg));
strcpy (q, "-I");
@@ -329,6 +326,9 @@ gnat_handle_option (size_t scode, const
gnat_argv[gnat_argc] = xstrdup (arg);
gnat_argc++;
break;
+
+ default:
+ gcc_unreachable ();
}
return 1;
@@ -464,7 +464,7 @@ gnat_init (void)
static void
gnat_finish_incomplete_decl (tree dont_care ATTRIBUTE_UNUSED)
{
- abort ();
+ gcc_unreachable ();
}
/* Compute the alignment of the largest mode that can be used for copying
@@ -669,7 +669,7 @@ gnat_expand_expr (tree exp, rtx target,
/* ... fall through ... */
default:
- abort ();
+ gcc_unreachable ();
}
return expand_expr_real (new, target, tmode, modifier, alt_rtl);
@@ -916,7 +916,7 @@ fp_prec_to_size (int prec)
if (GET_MODE_PRECISION (mode) == prec)
return GET_MODE_BITSIZE (mode);
- abort ();
+ gcc_unreachable ();
}
int
@@ -929,5 +929,5 @@ fp_size_to_prec (int size)
if (GET_MODE_BITSIZE (mode) == size)
return GET_MODE_PRECISION (mode);
- abort ();
+ gcc_unreachable ();
}