public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Alex Coplan <acoplan@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/vendors/ARM/heads/morello)] testsuite: Fix up cheri-overloads-4.c Date: Tue, 28 Feb 2023 12:10:07 +0000 (GMT) [thread overview] Message-ID: <20230228121007.BDCDC3858D39@sourceware.org> (raw) https://gcc.gnu.org/g:0ad9a9e9b3882f6d2bf5c14e3b7ce47e60040f21 commit 0ad9a9e9b3882f6d2bf5c14e3b7ce47e60040f21 Author: Alex Coplan <alex.coplan@arm.com> 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 <stddef.h> #include <string.h> @@ -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
reply other threads:[~2023-02-28 12:10 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230228121007.BDCDC3858D39@sourceware.org \ --to=acoplan@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).