diff mbox series

[12/25] tests/tcg: add message to _Static_assert in test-avx

Message ID 20250226140343.3907080-13-alex.bennee@linaro.org
State New
Headers show
Series maintainer updates for 10.0 softfreeze (gpu/tcg tests, plugins, MAINTAINERS) | expand

Commit Message

Alex Bennée Feb. 26, 2025, 2:03 p.m. UTC
In preparation for enabling clang and avoiding:

  error: '_Static_assert' with no message is a C2x extension [-Werror,-Wc2x-extensions]

lets just add the message.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/tcg/i386/test-avx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Thomas Huth Feb. 26, 2025, 4:17 p.m. UTC | #1
On 26/02/2025 15.03, Alex Bennée wrote:
> In preparation for enabling clang and avoiding:
> 
>    error: '_Static_assert' with no message is a C2x extension [-Werror,-Wc2x-extensions]
> 
> lets just add the message.

let's ?

> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>   tests/tcg/i386/test-avx.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/tcg/i386/test-avx.c b/tests/tcg/i386/test-avx.c
> index 230e6d84b8..43df2226b9 100644
> --- a/tests/tcg/i386/test-avx.c
> +++ b/tests/tcg/i386/test-avx.c
> @@ -244,7 +244,7 @@ v4di indexd = {0x00000002ffffffcdull, 0xfffffff500000010ull,
>                  0x0000003afffffff0ull, 0x000000000000000eull};
>   
>   v4di gather_mem[0x20];
> -_Static_assert(sizeof(gather_mem) == 1024);
> +_Static_assert(sizeof(gather_mem) == 1024, "gather_mem not defined size");

s/defined/expected/ ?

Anyway,
Reviewed-by: Thomas Huth <thuth@redhat.com>
diff mbox series

Patch

diff --git a/tests/tcg/i386/test-avx.c b/tests/tcg/i386/test-avx.c
index 230e6d84b8..43df2226b9 100644
--- a/tests/tcg/i386/test-avx.c
+++ b/tests/tcg/i386/test-avx.c
@@ -244,7 +244,7 @@  v4di indexd = {0x00000002ffffffcdull, 0xfffffff500000010ull,
                0x0000003afffffff0ull, 0x000000000000000eull};
 
 v4di gather_mem[0x20];
-_Static_assert(sizeof(gather_mem) == 1024);
+_Static_assert(sizeof(gather_mem) == 1024, "gather_mem not defined size");
 
 void init_f16reg(v4di *r)
 {