public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Richard Earnshaw <rearnsha@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-3411] rtl: Forward declare rtx_code Date: Wed, 23 Aug 2023 16:15:08 +0000 (GMT) [thread overview] Message-ID: <20230823161508.9F9713857731@sourceware.org> (raw) https://gcc.gnu.org/g:3e086a12c273e5abb45d0228dc624acf97871ef3 commit r14-3411-g3e086a12c273e5abb45d0228dc624acf97871ef3 Author: Richard Earnshaw <rearnsha@arm.com> Date: Thu Jul 27 17:28:30 2023 +0100 rtl: Forward declare rtx_code Now that we require C++ 11, we can safely forward declare rtx_code so that we can use it in target hooks. gcc/ChangeLog * coretypes.h (rtx_code): Add forward declaration. * rtl.h (rtx_code): Make compatible with forward declaration. Diff: --- gcc/coretypes.h | 4 ++++ gcc/rtl.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/coretypes.h b/gcc/coretypes.h index 3e9a2f19e27b..f86dc169a40b 100644 --- a/gcc/coretypes.h +++ b/gcc/coretypes.h @@ -101,6 +101,10 @@ typedef gimple *gimple_seq; struct gimple_stmt_iterator; class code_helper; +/* Forward declare rtx_code, so that we can use it in target hooks without + needing to pull in rtl.h. */ +enum rtx_code : unsigned; + /* Forward decls for leaf gimple subclasses (for individual gimple codes). Keep this in the same order as the corresponding codes in gimple.def. */ diff --git a/gcc/rtl.h b/gcc/rtl.h index e1c51156f909..0e9491b89b4d 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -45,7 +45,7 @@ class predefined_function_abi; /* Register Transfer Language EXPRESSIONS CODES */ #define RTX_CODE enum rtx_code -enum rtx_code { +enum rtx_code : unsigned { #define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS) ENUM , #include "rtl.def" /* rtl expressions are documented here */
reply other threads:[~2023-08-23 16:15 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=20230823161508.9F9713857731@sourceware.org \ --to=rearnsha@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).