diff mbox series

[38/39] malloc: Only enable -Waggressive-loop-optimizations suppression for gcc

Message ID 20241222000509.2205895-39-hjl.tools@gmail.com
State New
Headers show
Series [01/39] conform: Use -dD instead of -dN on compiler invocation | expand

Commit Message

H.J. Lu Dec. 22, 2024, 12:05 a.m. UTC
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>

---
 malloc/tst-dynarray.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Sam James Dec. 22, 2024, 4:59 a.m. UTC | #1
"H.J. Lu" <hjl.tools@gmail.com> writes:

> From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
>
> ---
>  malloc/tst-dynarray.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/malloc/tst-dynarray.c b/malloc/tst-dynarray.c
> index 757add26f3..1009e27dfa 100644
> --- a/malloc/tst-dynarray.c
> +++ b/malloc/tst-dynarray.c
> @@ -482,7 +482,7 @@ test_long_overflow (void)
>         iteration would invoke undefined behavior.  That loop iteration
>         can never be executed because an allocation of this size must
>         fail.  */
> -    DIAG_IGNORE_NEEDS_COMMENT (12, "-Waggressive-loop-optimizations");
> +    DIAG_IGNORE_NEEDS_COMMENT_GCC (12, "-Waggressive-loop-optimizations");
>      TEST_VERIFY (!dynarray_long_resize
>                   (&dyn, (SIZE_MAX / sizeof (long)) + 1));
>      DIAG_POP_NEEDS_COMMENT;
> @@ -499,7 +499,7 @@ test_long_overflow (void)
>         iteration would invoke undefined behavior.  That loop iteration
>         can never be executed because an allocation of this size must
>         fail.  */
> -    DIAG_IGNORE_NEEDS_COMMENT (12, "-Waggressive-loop-optimizations");
> +    DIAG_IGNORE_NEEDS_COMMENT_GCC (12, "-Waggressive-loop-optimizations");
>      TEST_VERIFY (!dynarray_long_noscratch_resize
>                   (&dyn, (SIZE_MAX / sizeof (long)) + 1));
>      DIAG_POP_NEEDS_COMMENT;

Reviewed-by: Sam James <sam@gentoo.org>
diff mbox series

Patch

diff --git a/malloc/tst-dynarray.c b/malloc/tst-dynarray.c
index 757add26f3..1009e27dfa 100644
--- a/malloc/tst-dynarray.c
+++ b/malloc/tst-dynarray.c
@@ -482,7 +482,7 @@  test_long_overflow (void)
        iteration would invoke undefined behavior.  That loop iteration
        can never be executed because an allocation of this size must
        fail.  */
-    DIAG_IGNORE_NEEDS_COMMENT (12, "-Waggressive-loop-optimizations");
+    DIAG_IGNORE_NEEDS_COMMENT_GCC (12, "-Waggressive-loop-optimizations");
     TEST_VERIFY (!dynarray_long_resize
                  (&dyn, (SIZE_MAX / sizeof (long)) + 1));
     DIAG_POP_NEEDS_COMMENT;
@@ -499,7 +499,7 @@  test_long_overflow (void)
        iteration would invoke undefined behavior.  That loop iteration
        can never be executed because an allocation of this size must
        fail.  */
-    DIAG_IGNORE_NEEDS_COMMENT (12, "-Waggressive-loop-optimizations");
+    DIAG_IGNORE_NEEDS_COMMENT_GCC (12, "-Waggressive-loop-optimizations");
     TEST_VERIFY (!dynarray_long_noscratch_resize
                  (&dyn, (SIZE_MAX / sizeof (long)) + 1));
     DIAG_POP_NEEDS_COMMENT;