public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-1258] testsuite: Rename test-defined macros
@ 2022-06-24 20:26 Dimitar Dimitrov
  0 siblings, 0 replies; only message in thread
From: Dimitar Dimitrov @ 2022-06-24 20:26 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:2e2371b5daad74b581842bbc846f8f10c78d4520

commit r13-1258-g2e2371b5daad74b581842bbc846f8f10c78d4520
Author: Dimitar Dimitrov <dimitar@dinux.eu>
Date:   Sun May 8 15:35:02 2022 +0300

    testsuite: Rename test-defined macros
    
    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.
    
    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 <dimitar@dinux.eu>

Diff:
---
 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)
 {


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-24 20:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-24 20:26 [gcc r13-1258] testsuite: Rename test-defined macros Dimitar Dimitrov

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).