From 9540b3c316d16dd49bc890937b4974f51dfa33a7 Mon Sep 17 00:00:00 2001 From: Kyrylo Tkachov Date: Mon, 28 Apr 2014 12:42:54 +0000 Subject: [PATCH] [ARM/AArch64] Use signed chars in gcc.dg/pr60114.c. PR c/60983 * gcc.dg/pr60114.c: Use signed chars. From-SVN: r209858 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/pr60114.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9cede570bc04..71af46770e5d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-04-28 Kyrylo Tkachov + + PR c/60983 + * gcc.dg/pr60114.c: Use signed chars. + 2014-04-28 Paolo Carlini PR c++/59120 diff --git a/gcc/testsuite/gcc.dg/pr60114.c b/gcc/testsuite/gcc.dg/pr60114.c index 83f985257045..c656a9586aab 100644 --- a/gcc/testsuite/gcc.dg/pr60114.c +++ b/gcc/testsuite/gcc.dg/pr60114.c @@ -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" } */ -- 2.47.3