From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7810) id BDCDC3858D39; Tue, 28 Feb 2023 12:10:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BDCDC3858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677586207; bh=bRkNwVBzQ+xGgWOILNz61YTKHeQX4POly53+T/vzONs=; h=From:To:Subject:Date:From; b=fuxSHPFc46+468L1YLompVKI8bXu5MIxr7OstaXJBn9VTamjJzrkgsSBjMkTz/pU2 ThymCgqjCwmPI8LQ4fnYk5BJLW2FZLkDxhbxV4aH4Mpx/anlb+7ufscO5PwUhoFLNX kBCc3eBW46NAM/UOXYaAey261X9VAMEfOFs+bdCw= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Alex Coplan To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/vendors/ARM/heads/morello)] testsuite: Fix up cheri-overloads-4.c X-Act-Checkin: gcc X-Git-Author: Alex Coplan X-Git-Refname: refs/vendors/ARM/heads/morello X-Git-Oldrev: 2a6819fecb5fdce883b682d7109f935e3922dab5 X-Git-Newrev: 0ad9a9e9b3882f6d2bf5c14e3b7ce47e60040f21 Message-Id: <20230228121007.BDCDC3858D39@sourceware.org> Date: Tue, 28 Feb 2023 12:10:07 +0000 (GMT) List-Id: https://gcc.gnu.org/g:0ad9a9e9b3882f6d2bf5c14e3b7ce47e60040f21 commit 0ad9a9e9b3882f6d2bf5c14e3b7ce47e60040f21 Author: Alex Coplan Date: Mon Jan 30 15:19:49 2023 +0000 testsuite: Fix up cheri-overloads-4.c This test was failing in C++ mode since it tested for a -Wsign-conversion warning but -Wsign-conversion isn't enabled by -Wconversion in C++ mode. This patch fixes the issue by adding -Wsign-conversion to the options used for the test. A couple of other dg-warning directives in the test did account for this difference between C and C++ modes by XFAILing in C++ mode; with this change, we can now drop these XFAILs. Diff: --- gcc/testsuite/c-c++-common/cheri-overloads-4.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/testsuite/c-c++-common/cheri-overloads-4.c b/gcc/testsuite/c-c++-common/cheri-overloads-4.c index 6e437165f96..89c3a1e7f14 100644 --- a/gcc/testsuite/c-c++-common/cheri-overloads-4.c +++ b/gcc/testsuite/c-c++-common/cheri-overloads-4.c @@ -1,5 +1,5 @@ /* { dg-require-effective-target cheri_capability_any } */ -/* { dg-options "-W -Wall -Wconversion" } */ +/* { dg-options "-W -Wall -Wconversion -Wsign-conversion" } */ #include #include @@ -77,7 +77,7 @@ intcap_ret_voidp (__intcap_t a, __uintcap_t b) int *__capability intp_intcap (int *__capability a, __intcap_t b) { - return __builtin_cheri_cap_build (a, b); /* { dg-warning {may change the sign} "" { xfail c++ } } */ + return __builtin_cheri_cap_build (a, b); /* { dg-warning {may change the sign} "" } */ } int *__capability @@ -90,7 +90,7 @@ intp_intp (int *__capability a, int *__capability b) int *__capability intp_int64 (int *__capability a, int64_t b) { - return __builtin_cheri_cap_build (a, b); /* { dg-warning {may change the sign} "" { xfail c++ } } */ + return __builtin_cheri_cap_build (a, b); /* { dg-warning {may change the sign} "" } */ } int *__capability