This is the mail archive of the gcc-bugs@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]

gcc-20001027: Funny handling of qualifiers


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

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