aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorGaius Mulley <gaiusmod2@gmail.com>2022-12-06 02:45:37 +0000
committerGaius Mulley <gaiusmod2@gmail.com>2022-12-06 02:45:37 +0000
commit5405813b8aab29b9ca035a8c7bceac178494649f (patch)
tree17f2fb5b541bb983bf8f12292d48cc7d9a2b1776 /gcc
parentdb80db0aab7035ea91f16e82963ea38e088c7d00 (diff)
downloadgcc-5405813b8aab29b9ca035a8c7bceac178494649f.zip
gcc-5405813b8aab29b9ca035a8c7bceac178494649f.tar.gz
gcc-5405813b8aab29b9ca035a8c7bceac178494649f.tar.bz2
gm2-lang.cc further tidyup of code.
More tidying and complete the feedback suggestions made during the code review. gcc/m2/ChangeLog: * m2/gm2-lang.cc (gm2_langhook_init_options_struct): Remove x_flag_non_call_exceptions. Remove commented code. Add for loop to check whether any prebuilt integer types are suitable for use. Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
Diffstat (limited to 'gcc')
-rw-r--r--gcc/m2/gm2-lang.cc21
1 files changed, 8 insertions, 13 deletions
diff --git a/gcc/m2/gm2-lang.cc b/gcc/m2/gm2-lang.cc
index 1319ef7..2f57d74 100644
--- a/gcc/m2/gm2-lang.cc
+++ b/gcc/m2/gm2-lang.cc
@@ -130,10 +130,8 @@ gm2_langhook_init_options_struct (struct gcc_options *opts)
opts->x_flag_errno_math = 0;
opts->frontend_set_flag_errno_math = true;
- /* Exceptions are used to handle recovering from panics. */
+ /* Exceptions are used. */
opts->x_flag_exceptions = 1;
- opts->x_flag_non_call_exceptions = 1;
-
init_FrontEndInit ();
}
@@ -151,8 +149,6 @@ gm2_langhook_init_options (unsigned int decoded_options_count,
unsigned int i;
bool in_cpp_args = false;
- // filename_cpp = ggc_vec_alloc<bool> (decoded_options_count);
-
for (i = 1; i < decoded_options_count; i++)
{
switch (decoded_options[i].opt_index)
@@ -471,6 +467,12 @@ gm2_langhook_type_for_mode (machine_mode mode, int unsignedp)
{
tree type;
+ for (int i = 0; i < NUM_INT_N_ENTS; i ++)
+ if (int_n_enabled_p[i]
+ && mode == int_n_data[i].m)
+ return (unsignedp ? int_n_trees[i].unsigned_type
+ : int_n_trees[i].signed_type);
+
if (VECTOR_MODE_P (mode))
{
tree inner;
@@ -496,9 +498,6 @@ gm2_langhook_type_for_mode (machine_mode mode, int unsignedp)
if (COMPLEX_MODE_P (mode))
{
- machine_mode inner_mode;
- tree inner_type;
-
if (mode == TYPE_MODE (complex_float_type_node))
return complex_float_type_node;
if (mode == TYPE_MODE (complex_double_type_node))
@@ -537,11 +536,7 @@ gm2_langhook_global_bindings_p (void)
return current_function_decl == NULL_TREE;
}
-/* Push a declaration into the current binding level. We can't
- usefully implement this since we don't want to convert from tree back
- to one of our internal data structures. I think the only way this is
- used is to record a decl which is to be returned by getdecls, and we
- could implement it for that purpose if necessary. */
+/* Unused langhook. */
static tree
gm2_langhook_pushdecl (tree decl ATTRIBUTE_UNUSED)