public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Gaius Mulley <gaius@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/modula-2] gm2-lang.cc further tidyup of code. Date: Tue, 6 Dec 2022 02:45:57 +0000 (GMT) [thread overview] Message-ID: <20221206024557.BB789395252F@sourceware.org> (raw) https://gcc.gnu.org/g:5405813b8aab29b9ca035a8c7bceac178494649f commit 5405813b8aab29b9ca035a8c7bceac178494649f Author: Gaius Mulley <gaiusmod2@gmail.com> Date: Tue Dec 6 02:45:37 2022 +0000 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> Diff: --- gcc/m2/gm2-lang.cc | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/gcc/m2/gm2-lang.cc b/gcc/m2/gm2-lang.cc index 1319ef73562..2f57d740a36 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)
reply other threads:[~2022-12-06 2:45 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20221206024557.BB789395252F@sourceware.org \ --to=gaius@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).