This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [testsuite/C] check target supports large long double and fix Wconversion tests failures


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]