https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117628

            Bug ID: 117628
           Summary: New gcc build failure on 32 bit ARM
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

A couple of days ago a gcc trunk build on a Raspberry PI 5
worked fine. Today, not.

New error is 

../trunk/libgcc/config/arm/linux-atomic.c:252:23: error: two or more data types
in declaration specifiers

Source code is

typedef unsigned char bool;

Commenting out the code seems to make it compile. There were a couple of 
duplicates in other files. 

This diff seems to make the build work:

diff --git a/libgcc/config/arm/linux-atomic-64bit.c b/libgcc/config/arm/linux-a
tomic-64bit.c
index b35dcec0fb..18c81b8ff5 100644
--- a/libgcc/config/arm/linux-atomic-64bit.c
+++ b/libgcc/config/arm/linux-atomic-64bit.c
@@ -141,7 +141,7 @@ __sync_val_compare_and_swap_8 (long long *ptr, long long ol
dval,
     }
 }

-typedef unsigned char bool;
+/* typedef unsigned char bool; */

 bool HIDDEN
 __sync_bool_compare_and_swap_8 (long long *ptr, long long oldval,
diff --git a/libgcc/config/arm/linux-atomic.c b/libgcc/config/arm/linux-atomic.
c
index 2ad68ead50..252875adcb 100644
--- a/libgcc/config/arm/linux-atomic.c
+++ b/libgcc/config/arm/linux-atomic.c
@@ -249,7 +249,7 @@ __sync_val_compare_and_swap_4 (int *ptr, int oldval, int ne
wval)
 SUBWORD_VAL_CAS (short,       2)
 SUBWORD_VAL_CAS (signed char, 1)

-typedef unsigned char bool;
+/* typedef unsigned char bool; */

 bool HIDDEN
 __sync_bool_compare_and_swap_4 (int *ptr, int oldval, int newval)
diff --git a/libgcc/unwind-arm-common.inc b/libgcc/unwind-arm-common.inc
index 576f7e93e8..1cd43864ab 100644
--- a/libgcc/unwind-arm-common.inc
+++ b/libgcc/unwind-arm-common.inc
@@ -52,7 +52,7 @@

 /* Definitions for C++ runtime support routines.  We make these weak
    declarations to avoid pulling in libsupc++ unnecessarily.  */
-typedef unsigned char bool;
+/* typedef unsigned char bool; */

 typedef struct _ZSt9type_info type_info; /* This names C++ type_info type */
 enum __cxa_type_match_result

Working version g:361050589b144913. Broken version g:601a734188f3d2d3

Reply via email to