gcc-20001027: Funny handling of qualifiers

Horst von Brand vonbrand@sleipnir.valparaiso.cl
Sat Oct 28 13:38:00 GMT 2000


Red Hat 7, i686

The following (distilled from kernel/printk.c, linux-2.4.0-test10-pre6)
gets the bogus warning:

/tmp/tst.c:9: warning: passing arg 1 of `f' discards qualifiers from pointer target type

extern int f(const char *s);

struct {
   char name[8];
} a[8];

int g()
{
   f(a[1].name);
}
-- 
Horst von Brand                             vonbrand@sleipnir.valparaiso.cl
Casilla 9G, Vin~a del Mar, Chile                               +56 32 672616


More information about the Gcc-bugs mailing list