Re: [patch 1/2] m68k: runtime patching infrastructure

Wouter Verhelst
2007-06-03T15:57:22Z

On Tue, May 29, 2007 at 05:38:18PM -0700, Andrew Morton wrote:
[...]
> > +struct mod_arch_specific {
> > + struct m68k_fixup_info *fixup_start, *fixup_end;
> > +};
>
> Here we use struct m68k_fixup_info.
[...]
> > +struct m68k_fixup_info {
> > + enum m68k_fixup_type type;
> > + void *addr;
> > +};
>
> and later we define it.
>
> How come it doesn't spit warnings?

Because otherwise you couldn't create linked lists:

struct foo {
void* data;
struct foo* next;
};

At that point it hasn't been defined yet but it is being used. This is
legal, so the compiler can't create a warning for that.

Which is not to say that it's a nice coding style, but that's a
different matter.

--
Shaw's Principle:
Build a system that even a fool can use, and only a fool will
want to use it.