This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [testsuite/C] check target supports large long double and fix Wconversion tests failures
- From: Jakub Jelinek <jakub at redhat dot com>
- To: lopezibanez at gmail dot com
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 2 Dec 2006 02:44:29 -0500
- Subject: Re: [testsuite/C] check target supports large long double and fix Wconversion tests failures
- References: <6c33472e0612012055o1d03f160ja2b8983480696783@mail.gmail.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Sat, Dec 02, 2006 at 04:55:47AM +0000, Manuel L?pez-Ib??ez wrote:
> :ADDPATCH testsuite / C :
>
> --- gcc/testsuite/gcc.dg/Wconversion-integer.c (revision 119259)
> +++ gcc/testsuite/gcc.dg/Wconversion-integer.c (working copy)
> @@ -20,8 +20,8 @@ void h (int x)
>
> fuc (-1); /* { dg-warning "negative integer implicitly converted to unsigned type" } */
> uc = -1; /* { dg-warning "negative integer implicitly converted to unsigned type" } */
> - fuc ('\xa0'); /* { dg-warning "negative integer implicitly converted to unsigned type" } */
> - uc = '\xa0'; /* { dg-warning "negative integer implicitly converted to unsigned type" } */
> + fuc (-92); /* { dg-warning "negative integer implicitly converted to unsigned type" } */
> + uc = -92; /* { dg-warning "negative integer implicitly converted to unsigned type" } */
> uc = x ? 1U : -1; /* { dg-warning "conversion" } */
> /* { dg-warning "negative integer implicitly converted to unsigned type" "" { target *-*-* } 25 } */
> uc = x ? SCHAR_MIN : 1U; /* { dg-warning "conversion" } */
> @@ -59,8 +59,8 @@ void h (int x)
> fui (sc); /* { dg-warning "conversion" } */
> ui = sc; /* { dg-warning "conversion" } */
>
> - fui ('\xa0');/* { dg-warning "negative integer implicitly converted to unsigned type" } */
> - ui = '\xa0'; /* { dg-warning "negative integer implicitly converted to unsigned type" } */
> + fui (-92);/* { dg-warning "negative integer implicitly converted to unsigned type" } */
> + ui = -92; /* { dg-warning "negative integer implicitly converted to unsigned type" } */
>
> fsi (si);
> fui (ui);
I think you want to add instead -fsigned-char to dg-options in this test.
There is no point in testing two different negative integers, it wants
to test negative (signed) char values too.
Jakub