On Thu, Jun 23, 2022 at 11:23 PM Dimitar Dimitrov <dimi...@dinux.eu> wrote: > > Epiphany, PRU, ARC and NDS32 may predefine __big_endian__ and > __little_endian__ macros. This leads to spurious warnings like: > gcc.dg/sso/memcpy-1.c:7: warning: "__little_endian__" redefined > > Fix by renaming the macros in the test. > > Ok for trunk?
OK > gcc/testsuite/ChangeLog: > > * gcc.dg/sso/memcpy-1.c (__big_endian__, __little_endian__): > Rename macros to avoid conflicts with predefined ones. > > Signed-off-by: Dimitar Dimitrov <dimi...@dinux.eu> > --- > gcc/testsuite/gcc.dg/sso/memcpy-1.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/gcc/testsuite/gcc.dg/sso/memcpy-1.c > b/gcc/testsuite/gcc.dg/sso/memcpy-1.c > index b4e1c8786d9..0dea955cbaf 100644 > --- a/gcc/testsuite/gcc.dg/sso/memcpy-1.c > +++ b/gcc/testsuite/gcc.dg/sso/memcpy-1.c > @@ -3,20 +3,20 @@ > typedef unsigned char uint8_t; > typedef unsigned int uint32_t; > > -#define __big_endian__ scalar_storage_order("big-endian") > -#define __little_endian__ scalar_storage_order("little-endian") > +#define __big_endian_attr__ scalar_storage_order("big-endian") > +#define __little_endian_attr__ scalar_storage_order("little-endian") > > typedef union > { > uint32_t val; > uint8_t v[4]; > -} __attribute__((__big_endian__)) upal_u32be_t; > +} __attribute__((__big_endian_attr__)) upal_u32be_t; > > typedef union > { > uint32_t val; > uint8_t v[4]; > -} __attribute__((__little_endian__)) upal_u32le_t; > +} __attribute__((__little_endian_attr__)) upal_u32le_t; > > static inline uint32_t native_to_big_endian(uint32_t t) > { > -- > 2.36.1 >