aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjiawei <jiawei@iscas.ac.cn>2022-05-05 18:33:20 +0800
committerPalmer Dabbelt <palmer@rivosinc.com>2022-05-11 21:31:01 -0700
commit8585185cc4de3a9268af6afc42a0e86b7ba72b12 (patch)
treedd6e3bd346e8654a010d0a1d705dc39f7b7ff782
parentd0d513b5eae70f26c664fa81c2f56e907b66aeff (diff)
downloadgcc-8585185cc4de3a9268af6afc42a0e86b7ba72b12.zip
gcc-8585185cc4de3a9268af6afc42a0e86b7ba72b12.tar.gz
gcc-8585185cc4de3a9268af6afc42a0e86b7ba72b12.tar.bz2
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.
-rw-r--r--gcc/testsuite/c-c++-common/Wconversion-1.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/testsuite/c-c++-common/Wconversion-1.c b/gcc/testsuite/c-c++-common/Wconversion-1.c
index ed65918..81f9498 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." } */
}