public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-336] testsuite: Update Wconversion testcase check type.
@ 2022-05-12  4:31 Palmer Dabbelt
  0 siblings, 0 replies; only message in thread
From: Palmer Dabbelt @ 2022-05-12  4:31 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:8585185cc4de3a9268af6afc42a0e86b7ba72b12

commit r13-336-g8585185cc4de3a9268af6afc42a0e86b7ba72b12
Author: jiawei <jiawei@iscas.ac.cn>
Date:   Thu May 5 18:33:20 2022 +0800

    testsuite: Update Wconversion testcase check type.
    
    Some compiler target like arm-linux\riscv\power\s390x\xtensa-gcc handle
    char as unsigned char, then there are no warnings occur and got FAIL cases.
    Just change the type char into explicit signed char to keep the feature
    consistency.
    
    gcc/testsuite/ChangeLog:
    
            * c-c++-common/Wconversion-1.c: Update type.

Diff:
---
 gcc/testsuite/c-c++-common/Wconversion-1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/c-c++-common/Wconversion-1.c b/gcc/testsuite/c-c++-common/Wconversion-1.c
index ed65918c70f..81f9498d07c 100644
--- a/gcc/testsuite/c-c++-common/Wconversion-1.c
+++ b/gcc/testsuite/c-c++-common/Wconversion-1.c
@@ -10,5 +10,5 @@ void g()
   signed char sc = 300; /* { dg-warning "conversion from .int. to .signed char. changes value from .300. to .44." } */
   unsigned char uc = 300; /* { dg-warning "conversion from .int. to .unsigned char. changes value from .300. to .44." } */
   unsigned char uc2 = 300u; /* { dg-warning "conversion from .unsigned int. to .unsigned char. changes value from .300. to .44." } */
-  char c2 = (double)1.0 + 200; /* { dg-warning "overflow in conversion from .double. to .char. changes value from .2.01e\\+2. to .127." } */
+  signed char c2 = (double)1.0 + 200; /* { dg-warning "overflow in conversion from .double. to .signed char. changes value from .2.01e\\+2. to .127." } */
 }


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-12  4:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-12  4:31 [gcc r13-336] testsuite: Update Wconversion testcase check type Palmer Dabbelt

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).