gcc-20001027: Funny business with types on return

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


Red Hat 7, i686

The following gets the bogus warning:

/tmp/tst.c:7: warning: return from incompatible pointer type

struct {
   char name[8];
} a;

char *f()
{
     return &a.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