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

Manuel López-Ibáñez lopezibanez@gmail.com
Sat Dec 2 13:16:00 GMT 2006


On 02/12/06, Jakub Jelinek <jakub@redhat.com> wrote:
> On Sat, Dec 02, 2006 at 04:55:47AM +0000, Manuel L?pez-Ib??ez wrote:
> >    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.
>

I am not sure if I understand correctly what you mean. If you mean
that we want to test negative (signed) char values such as '\xa0', the
discussion that resulted in this patch is that char constants are of
type int. Thus, testing with -fsigned-char is the same as using a
negative integer. If this is true, I still prefer the current form so
we don't have to force anything on the target.

Anyway, I don't have any particular strong feeling for any form, so if
one C front-end maintainer prefers either form, I will modify the
patch accordingly. Please, let me know what is the preferred form.

Cheers,

Manuel.



More information about the Gcc-patches mailing list