On Wed, 30 May 2007, Joerg Dorchain wrote: > On Wed, May 30, 2007 at 09:06:08AM +0200, Geert Uytterhoeven wrote: > [...] > > > > > > > > I think it could be tightened up even if it happens not to warn? > > > > > > > > > struct a { > > > struct not_yet_defined *start, *end; > > > }; > > > > > > struct not_yet_defined { > > > void *foo; > > > }; > > > > > > Is a valid and gives no warnings. > > > > I was puzzled by this as well, as there were no compiler warnings... > > Pointers are (at least on m68k) of known size, so the compiler knows how > much space the struct occupies. > > Type checking is by definition futile with void * pointer, but for all > other cases the compiler has all types and sizes it needs at this point. > > The actual dereferencing of the symbol table is done by the linker, > which also knows all locations and sizes it needs.
True. > Actually, this is the only way to define circular referencing > structures. No, you have forward declarations for that. These are missing here. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [EMAIL PROTECTED] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/