This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
gcc-20001027: Funny handling of qualifiers
- To: gcc-bugs at gcc dot gnu dot org
- Subject: gcc-20001027: Funny handling of qualifiers
- From: Horst von Brand <vonbrand at sleipnir dot valparaiso dot cl>
- Date: Sat, 28 Oct 2000 11:01:11 -0300
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