On Fri, Jan 23, 2026 at 11:13 AM Karl Meakin <[email protected]> wrote:
>
> The `volatile` type qualifier is deprecated on function parameters and
> return types since C++ 20. This caused extra warning to be emmitted, so
> the test failed. Fix it by suppressing the warning.
>
> gcc/testsuite/ChangeLog:
>
> * g++.target/aarch64/sve/acle/general-c++/mangle_5.C: Fix test.
> ---
> .../g++.target/aarch64/sve/acle/general-c++/mangle_5.C | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/mangle_5.C
> b/gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/mangle_5.C
> index 1504cc12f41..6bf0d3fc967 100644
> --- a/gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/mangle_5.C
> +++ b/gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/mangle_5.C
> @@ -1,3 +1,5 @@
> +#pragma GCC diagnostic ignored "-Wvolatile"
Instead use:
// { dg-options "-Wno-volatile" }
And add a comment on why like:
// Disable warning about volatile qualifier on function arguments as
they are deprecated in C++20.
Ok with those changes.
> +
> typedef const __SVInt8_t foo;
> typedef volatile foo bar;
>
> --
> 2.43.0
>