lkml.org 
[lkml]   [2007]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 1/2] m68k: runtime patching infrastructure
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 -- geert@linux-m68k.org

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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-05-30 13:23    [W:0.505 / U:0.776 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site