[ARM/AArch64] Use signed chars in gcc.dg/pr60114.c.

PR c/60983
	* gcc.dg/pr60114.c: Use signed chars.

From-SVN: r209858
This commit is contained in:
Kyrylo Tkachov 2014-04-28 12:42:54 +00:00 committed by Kyrylo Tkachov
parent a3879fa1a8
commit 9540b3c316
2 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2014-04-28 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR c/60983
* gcc.dg/pr60114.c: Use signed chars.
2014-04-28 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/59120

View File

@ -3,7 +3,7 @@
/* { dg-options "-Wconversion" } */
struct S { int n, u[2]; };
const char z[] = {
const signed char z[] = {
[0] = 0x100, /* { dg-warning "9:overflow in implicit constant conversion" } */
[2] = 0x101, /* { dg-warning "9:overflow in implicit constant conversion" } */
};
@ -18,11 +18,11 @@ typedef int H[];
void
foo (void)
{
char a[][3] = { { 0x100, /* { dg-warning "21:overflow in implicit constant conversion" } */
signed char a[][3] = { { 0x100, /* { dg-warning "28:overflow in implicit constant conversion" } */
1, 0x100 }, /* { dg-warning "24:overflow in implicit constant conversion" } */
{ '\0', 0x100, '\0' } /* { dg-warning "27:overflow in implicit constant conversion" } */
};
(const char []) { 0x100 }; /* { dg-warning "21:overflow in implicit constant conversion" } */
(const signed char []) { 0x100 }; /* { dg-warning "28:overflow in implicit constant conversion" } */
(const float []) { 1e0, 1e1, 1e100 }; /* { dg-warning "32:conversion" } */
struct S s1 = { 0x80000000 }; /* { dg-warning "19:conversion of unsigned constant value to negative integer" } */
struct S s2 = { .n = 0x80000000 }; /* { dg-warning "24:conversion of unsigned constant value to negative integer" } */