diff mbox series

gcc/reload.h: Change type of x_spill_indirect_levels

Message ID AS1P195MB13982812469EE1DEFDF83A24AE16A@AS1P195MB1398.EURP195.PROD.OUTLOOK.COM
State New
Headers show
Series gcc/reload.h: Change type of x_spill_indirect_levels | expand

Commit Message

Eddy Young Tie Yang Aug. 13, 2023, 7:19 p.m. UTC
This patch changes the type of `x_spill_indirect_levels` member of
`struct target reload` from `bool` to `unsigned char`.

Without this change, the build of esp-open-sdk fails with GCC 11 and
above.

(Please bear with me, this is my first patch submission.)

        Cheers,
        Eddy

---
 ChangeLog    | 5 +++++
 gcc/reload.h | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

Comments

Andrew Pinski Aug. 13, 2023, 7:24 p.m. UTC | #1
On Sun, Aug 13, 2023 at 12:20 PM Eddy Young <jeyoung@priscimon.com> wrote:
>
> This patch changes the type of `x_spill_indirect_levels` member of
> `struct target reload` from `bool` to `unsigned char`.
>
> Without this change, the build of esp-open-sdk fails with GCC 11 and
> above.

This was done back in d57c99458933 for GCC 6.
https://gcc.gnu.org/r6-535-gd57c99458933a2 .
Why are you posting a patch against a branch which has not been
supported for years now?

Thanks,
Andrew Pinski


>
> (Please bear with me, this is my first patch submission.)
>
>         Cheers,
>         Eddy
>
> ---
>  ChangeLog    | 5 +++++
>  gcc/reload.h | 2 +-
>  2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/ChangeLog b/ChangeLog
> index 3dd1ce544af..442aa9192a9 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,3 +1,8 @@
> +2015-08-13 Eddy Young <jeyoung@priscimon.com>
> +
> +       * gcc/reload.h: Change type of x_spill_indirect_levels of struct
> +       target_reload to support C++17 build.
> +
>  2015-06-23  Release Manager
>
>         * GCC 4.8.5 released.
> diff --git a/gcc/reload.h b/gcc/reload.h
> index 7a13ad30e82..1e94d8ea93b 100644
> --- a/gcc/reload.h
> +++ b/gcc/reload.h
> @@ -166,7 +166,7 @@ struct target_reload {
>       value indicates the level of indirect addressing supported, e.g., two
>       means that (MEM (MEM (REG n))) is also valid if (REG n) does not get
>       a hard register.  */
> -  bool x_spill_indirect_levels;
> +  unsigned char x_spill_indirect_levels;
>
>    /* True if caller-save has been reinitialized.  */
>    bool x_caller_save_initialized_p;
> --
> 2.39.2
>
Eddy Young Tie Yang Aug. 13, 2023, 7:32 p.m. UTC | #2
On Sun, Aug 13, 2023 at 12:24:28PM -0700, Andrew Pinski wrote:
> Date: Sun, 13 Aug 2023 12:24:28 -0700
> From: Andrew Pinski <pinskia@gmail.com>
> To: Eddy Young <jeyoung@priscimon.com>
> Cc: gcc-patches@gcc.gnu.org
> Subject: Re: [PATCH] gcc/reload.h: Change type of x_spill_indirect_levels
> 
> On Sun, Aug 13, 2023 at 12:20 PM Eddy Young <jeyoung@priscimon.com> wrote:
> >
> > This patch changes the type of `x_spill_indirect_levels` member of
> > `struct target reload` from `bool` to `unsigned char`.
> >
> > Without this change, the build of esp-open-sdk fails with GCC 11 and
> > above.
> 
> This was done back in d57c99458933 for GCC 6.
> https://gcc.gnu.org/r6-535-gd57c99458933a2 .
> Why are you posting a patch against a branch which has not been
> supported for years now?
> 
> Thanks,
> Andrew Pinski

Hi, Andrew,

Project esp-open-sdk (https://github.com/pfalcon/esp-open-sdk) builds
GCC 4.8.5 from source to install its toolchain. With GCC 11 and newer,
the build fails without this patch.

esp-open-sdk is used for development on the ESP8266 MCU and boards based
on it.

I hope this helps.

        Cheers,
        Eddy
diff mbox series

Patch

diff --git a/ChangeLog b/ChangeLog
index 3dd1ce544af..442aa9192a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@ 
+2015-08-13 Eddy Young <jeyoung@priscimon.com>
+
+	* gcc/reload.h: Change type of x_spill_indirect_levels of struct
+	target_reload to support C++17 build.
+
 2015-06-23  Release Manager
 
 	* GCC 4.8.5 released.
diff --git a/gcc/reload.h b/gcc/reload.h
index 7a13ad30e82..1e94d8ea93b 100644
--- a/gcc/reload.h
+++ b/gcc/reload.h
@@ -166,7 +166,7 @@  struct target_reload {
      value indicates the level of indirect addressing supported, e.g., two
      means that (MEM (MEM (REG n))) is also valid if (REG n) does not get
      a hard register.  */
-  bool x_spill_indirect_levels;
+  unsigned char x_spill_indirect_levels;
 
   /* True if caller-save has been reinitialized.  */
   bool x_caller_save_initialized_p;