public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/azanella/clang] malloc: Suppress clang warning on tst-aligned-alloc
@ 2024-04-17 20:12 Adhemerval Zanella
  0 siblings, 0 replies; 8+ messages in thread
From: Adhemerval Zanella @ 2024-04-17 20:12 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0f38a02254077d5bd42c3f88ccaef10e733a76e2

commit 0f38a02254077d5bd42c3f88ccaef10e733a76e2
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Jul 27 15:55:42 2023 -0300

    malloc: Suppress clang warning on tst-aligned-alloc

Diff:
---
 malloc/tst-aligned-alloc.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/malloc/tst-aligned-alloc.c b/malloc/tst-aligned-alloc.c
index 91167d1392..b05be95a89 100644
--- a/malloc/tst-aligned-alloc.c
+++ b/malloc/tst-aligned-alloc.c
@@ -55,18 +55,31 @@ do_test (void)
   if (p2 == NULL)
     FAIL_EXIT1 ("aligned_alloc(1, 64) failed");
 
+  /* clang warns that alignment is not a power of 2, which is what the
+     test means to do.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (18.0, "-Wnon-power-of-two-alignment");
   p3 = aligned_alloc (65, 64);
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   if (p3 != NULL)
     FAIL_EXIT1 ("aligned_alloc(65, 64) did not fail");
 
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (18.0, "-Wnon-power-of-two-alignment");
   p4 = aligned_alloc (0, 64);
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   if (p4 != NULL)
     FAIL_EXIT1 ("aligned_alloc(0, 64) did not fail");
 
+  /* clang warns that alignment must be 4294967296 or smaller, which is
+     what the test means to do.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (18.0, "-Wbuiltin-assume-aligned-alignment");
   /* This is an alignment like 0x80000000...UL */
   p5 = aligned_alloc (SIZE_MAX / 2 + 1, 64);
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   if (p5 != NULL)
     FAIL_EXIT1 ("aligned_alloc(SIZE_MAX/2+1, 64) did not fail");

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [glibc/azanella/clang] malloc: Suppress clang warning on tst-aligned-alloc
@ 2024-04-02 15:58 Adhemerval Zanella
  0 siblings, 0 replies; 8+ messages in thread
From: Adhemerval Zanella @ 2024-04-02 15:58 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=1ad7df8681d2227d7b155145ad98ea8696e58ca3

commit 1ad7df8681d2227d7b155145ad98ea8696e58ca3
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Jul 27 15:55:42 2023 -0300

    malloc: Suppress clang warning on tst-aligned-alloc

Diff:
---
 malloc/tst-aligned-alloc.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/malloc/tst-aligned-alloc.c b/malloc/tst-aligned-alloc.c
index 91167d1392..b05be95a89 100644
--- a/malloc/tst-aligned-alloc.c
+++ b/malloc/tst-aligned-alloc.c
@@ -55,18 +55,31 @@ do_test (void)
   if (p2 == NULL)
     FAIL_EXIT1 ("aligned_alloc(1, 64) failed");
 
+  /* clang warns that alignment is not a power of 2, which is what the
+     test means to do.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (18.0, "-Wnon-power-of-two-alignment");
   p3 = aligned_alloc (65, 64);
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   if (p3 != NULL)
     FAIL_EXIT1 ("aligned_alloc(65, 64) did not fail");
 
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (18.0, "-Wnon-power-of-two-alignment");
   p4 = aligned_alloc (0, 64);
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   if (p4 != NULL)
     FAIL_EXIT1 ("aligned_alloc(0, 64) did not fail");
 
+  /* clang warns that alignment must be 4294967296 or smaller, which is
+     what the test means to do.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (18.0, "-Wbuiltin-assume-aligned-alignment");
   /* This is an alignment like 0x80000000...UL */
   p5 = aligned_alloc (SIZE_MAX / 2 + 1, 64);
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   if (p5 != NULL)
     FAIL_EXIT1 ("aligned_alloc(SIZE_MAX/2+1, 64) did not fail");

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [glibc/azanella/clang] malloc: Suppress clang warning on tst-aligned-alloc
@ 2024-02-09 17:36 Adhemerval Zanella
  0 siblings, 0 replies; 8+ messages in thread
From: Adhemerval Zanella @ 2024-02-09 17:36 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=6499a2757423592910a0ba766a6f5e221ee9699e

commit 6499a2757423592910a0ba766a6f5e221ee9699e
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Jul 27 15:55:42 2023 -0300

    malloc: Suppress clang warning on tst-aligned-alloc

Diff:
---
 malloc/tst-aligned-alloc.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/malloc/tst-aligned-alloc.c b/malloc/tst-aligned-alloc.c
index 91167d1392..b05be95a89 100644
--- a/malloc/tst-aligned-alloc.c
+++ b/malloc/tst-aligned-alloc.c
@@ -55,18 +55,31 @@ do_test (void)
   if (p2 == NULL)
     FAIL_EXIT1 ("aligned_alloc(1, 64) failed");
 
+  /* clang warns that alignment is not a power of 2, which is what the
+     test means to do.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (18.0, "-Wnon-power-of-two-alignment");
   p3 = aligned_alloc (65, 64);
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   if (p3 != NULL)
     FAIL_EXIT1 ("aligned_alloc(65, 64) did not fail");
 
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (18.0, "-Wnon-power-of-two-alignment");
   p4 = aligned_alloc (0, 64);
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   if (p4 != NULL)
     FAIL_EXIT1 ("aligned_alloc(0, 64) did not fail");
 
+  /* clang warns that alignment must be 4294967296 or smaller, which is
+     what the test means to do.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (18.0, "-Wbuiltin-assume-aligned-alignment");
   /* This is an alignment like 0x80000000...UL */
   p5 = aligned_alloc (SIZE_MAX / 2 + 1, 64);
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   if (p5 != NULL)
     FAIL_EXIT1 ("aligned_alloc(SIZE_MAX/2+1, 64) did not fail");

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [glibc/azanella/clang] malloc: Suppress clang warning on tst-aligned-alloc
@ 2024-02-07 14:11 Adhemerval Zanella
  0 siblings, 0 replies; 8+ messages in thread
From: Adhemerval Zanella @ 2024-02-07 14:11 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=ac19f1f88896d71a8f7e7760382ec0a22d2d8d2a

commit ac19f1f88896d71a8f7e7760382ec0a22d2d8d2a
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Jul 27 15:55:42 2023 -0300

    malloc: Suppress clang warning on tst-aligned-alloc

Diff:
---
 malloc/tst-aligned-alloc.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/malloc/tst-aligned-alloc.c b/malloc/tst-aligned-alloc.c
index 91167d1392..b05be95a89 100644
--- a/malloc/tst-aligned-alloc.c
+++ b/malloc/tst-aligned-alloc.c
@@ -55,18 +55,31 @@ do_test (void)
   if (p2 == NULL)
     FAIL_EXIT1 ("aligned_alloc(1, 64) failed");
 
+  /* clang warns that alignment is not a power of 2, which is what the
+     test means to do.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (18.0, "-Wnon-power-of-two-alignment");
   p3 = aligned_alloc (65, 64);
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   if (p3 != NULL)
     FAIL_EXIT1 ("aligned_alloc(65, 64) did not fail");
 
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (18.0, "-Wnon-power-of-two-alignment");
   p4 = aligned_alloc (0, 64);
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   if (p4 != NULL)
     FAIL_EXIT1 ("aligned_alloc(0, 64) did not fail");
 
+  /* clang warns that alignment must be 4294967296 or smaller, which is
+     what the test means to do.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (18.0, "-Wbuiltin-assume-aligned-alignment");
   /* This is an alignment like 0x80000000...UL */
   p5 = aligned_alloc (SIZE_MAX / 2 + 1, 64);
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   if (p5 != NULL)
     FAIL_EXIT1 ("aligned_alloc(SIZE_MAX/2+1, 64) did not fail");

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [glibc/azanella/clang] malloc: Suppress clang warning on tst-aligned-alloc
@ 2024-01-29 18:02 Adhemerval Zanella
  0 siblings, 0 replies; 8+ messages in thread
From: Adhemerval Zanella @ 2024-01-29 18:02 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c50d0c20744faa68e4a81a2a1e1b630668b6eeb7

commit c50d0c20744faa68e4a81a2a1e1b630668b6eeb7
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Jul 27 15:55:42 2023 -0300

    malloc: Suppress clang warning on tst-aligned-alloc

Diff:
---
 malloc/tst-aligned-alloc.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/malloc/tst-aligned-alloc.c b/malloc/tst-aligned-alloc.c
index 91167d1392..b05be95a89 100644
--- a/malloc/tst-aligned-alloc.c
+++ b/malloc/tst-aligned-alloc.c
@@ -55,18 +55,31 @@ do_test (void)
   if (p2 == NULL)
     FAIL_EXIT1 ("aligned_alloc(1, 64) failed");
 
+  /* clang warns that alignment is not a power of 2, which is what the
+     test means to do.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (18.0, "-Wnon-power-of-two-alignment");
   p3 = aligned_alloc (65, 64);
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   if (p3 != NULL)
     FAIL_EXIT1 ("aligned_alloc(65, 64) did not fail");
 
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (18.0, "-Wnon-power-of-two-alignment");
   p4 = aligned_alloc (0, 64);
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   if (p4 != NULL)
     FAIL_EXIT1 ("aligned_alloc(0, 64) did not fail");
 
+  /* clang warns that alignment must be 4294967296 or smaller, which is
+     what the test means to do.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (18.0, "-Wbuiltin-assume-aligned-alignment");
   /* This is an alignment like 0x80000000...UL */
   p5 = aligned_alloc (SIZE_MAX / 2 + 1, 64);
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   if (p5 != NULL)
     FAIL_EXIT1 ("aligned_alloc(SIZE_MAX/2+1, 64) did not fail");

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [glibc/azanella/clang] malloc: Suppress clang warning on tst-aligned-alloc
@ 2023-12-21 18:58 Adhemerval Zanella
  0 siblings, 0 replies; 8+ messages in thread
From: Adhemerval Zanella @ 2023-12-21 18:58 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d29d92099f14c60cde857ae0c69d826f21b56fef

commit d29d92099f14c60cde857ae0c69d826f21b56fef
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Jul 27 15:55:42 2023 -0300

    malloc: Suppress clang warning on tst-aligned-alloc

Diff:
---
 malloc/tst-aligned-alloc.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/malloc/tst-aligned-alloc.c b/malloc/tst-aligned-alloc.c
index 8bd6527147..23616dfa5b 100644
--- a/malloc/tst-aligned-alloc.c
+++ b/malloc/tst-aligned-alloc.c
@@ -55,18 +55,31 @@ do_test (void)
   if (p2 == NULL)
     FAIL_EXIT1 ("aligned_alloc(1, 64) failed");
 
+  /* clang warns that alignment is not a power of 2, which is what the
+     test means to do.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (18.0, "-Wnon-power-of-two-alignment");
   p3 = aligned_alloc (65, 64);
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   if (p3 != NULL)
     FAIL_EXIT1 ("aligned_alloc(65, 64) did not fail");
 
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (18.0, "-Wnon-power-of-two-alignment");
   p4 = aligned_alloc (0, 64);
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   if (p4 != NULL)
     FAIL_EXIT1 ("aligned_alloc(0, 64) did not fail");
 
+  /* clang warns that alignment must be 4294967296 or smaller, which is
+     what the test means to do.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (18.0, "-Wbuiltin-assume-aligned-alignment");
   /* This is an alignment like 0x80000000...UL */
   p5 = aligned_alloc (SIZE_MAX / 2 + 1, 64);
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   if (p5 != NULL)
     FAIL_EXIT1 ("aligned_alloc(SIZE_MAX/2+1, 64) did not fail");

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [glibc/azanella/clang] malloc: Suppress clang warning on tst-aligned-alloc
@ 2023-09-28 17:56 Adhemerval Zanella
  0 siblings, 0 replies; 8+ messages in thread
From: Adhemerval Zanella @ 2023-09-28 17:56 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=cb40ee75995a53b234b3e5c613d4f8a6db002e0b

commit cb40ee75995a53b234b3e5c613d4f8a6db002e0b
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Jul 27 15:55:42 2023 -0300

    malloc: Suppress clang warning on tst-aligned-alloc

Diff:
---
 malloc/tst-aligned-alloc.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/malloc/tst-aligned-alloc.c b/malloc/tst-aligned-alloc.c
index 8bd6527147..23616dfa5b 100644
--- a/malloc/tst-aligned-alloc.c
+++ b/malloc/tst-aligned-alloc.c
@@ -55,18 +55,31 @@ do_test (void)
   if (p2 == NULL)
     FAIL_EXIT1 ("aligned_alloc(1, 64) failed");
 
+  /* clang warns that alignment is not a power of 2, which is what the
+     test means to do.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (18.0, "-Wnon-power-of-two-alignment");
   p3 = aligned_alloc (65, 64);
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   if (p3 != NULL)
     FAIL_EXIT1 ("aligned_alloc(65, 64) did not fail");
 
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (18.0, "-Wnon-power-of-two-alignment");
   p4 = aligned_alloc (0, 64);
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   if (p4 != NULL)
     FAIL_EXIT1 ("aligned_alloc(0, 64) did not fail");
 
+  /* clang warns that alignment must be 4294967296 or smaller, which is
+     what the test means to do.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (18.0, "-Wbuiltin-assume-aligned-alignment");
   /* This is an alignment like 0x80000000...UL */
   p5 = aligned_alloc (SIZE_MAX / 2 + 1, 64);
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   if (p5 != NULL)
     FAIL_EXIT1 ("aligned_alloc(SIZE_MAX/2+1, 64) did not fail");

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [glibc/azanella/clang] malloc: Suppress clang warning on tst-aligned-alloc
@ 2023-08-30 12:43 Adhemerval Zanella
  0 siblings, 0 replies; 8+ messages in thread
From: Adhemerval Zanella @ 2023-08-30 12:43 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=ea779db0d5d09a11b9acc714d1db45108988cd8b

commit ea779db0d5d09a11b9acc714d1db45108988cd8b
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Jul 27 15:55:42 2023 -0300

    malloc: Suppress clang warning on tst-aligned-alloc

Diff:
---
 malloc/tst-aligned-alloc.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/malloc/tst-aligned-alloc.c b/malloc/tst-aligned-alloc.c
index 8bd6527147..23616dfa5b 100644
--- a/malloc/tst-aligned-alloc.c
+++ b/malloc/tst-aligned-alloc.c
@@ -55,18 +55,31 @@ do_test (void)
   if (p2 == NULL)
     FAIL_EXIT1 ("aligned_alloc(1, 64) failed");
 
+  /* clang warns that alignment is not a power of 2, which is what the
+     test means to do.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (18.0, "-Wnon-power-of-two-alignment");
   p3 = aligned_alloc (65, 64);
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   if (p3 != NULL)
     FAIL_EXIT1 ("aligned_alloc(65, 64) did not fail");
 
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (18.0, "-Wnon-power-of-two-alignment");
   p4 = aligned_alloc (0, 64);
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   if (p4 != NULL)
     FAIL_EXIT1 ("aligned_alloc(0, 64) did not fail");
 
+  /* clang warns that alignment must be 4294967296 or smaller, which is
+     what the test means to do.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (18.0, "-Wbuiltin-assume-aligned-alignment");
   /* This is an alignment like 0x80000000...UL */
   p5 = aligned_alloc (SIZE_MAX / 2 + 1, 64);
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   if (p5 != NULL)
     FAIL_EXIT1 ("aligned_alloc(SIZE_MAX/2+1, 64) did not fail");

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-04-17 20:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-17 20:12 [glibc/azanella/clang] malloc: Suppress clang warning on tst-aligned-alloc Adhemerval Zanella
  -- strict thread matches above, loose matches on Subject: below --
2024-04-02 15:58 Adhemerval Zanella
2024-02-09 17:36 Adhemerval Zanella
2024-02-07 14:11 Adhemerval Zanella
2024-01-29 18:02 Adhemerval Zanella
2023-12-21 18:58 Adhemerval Zanella
2023-09-28 17:56 Adhemerval Zanella
2023-08-30 12:43 Adhemerval Zanella

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