On Saturday 07 January 2006 01:20, Matt Mackall wrote:
> On Sat, Jan 07, 2006 at 01:05:16AM +0100, Andi Kleen wrote:
> > And gcc is really picky about type compatibility between source files
> > with program-at-a-time. If any types of the same symbols are
> > incompatible even in minor ways you get an ICE. That's technically
> > illegal, but tends to happen often in practice (e.g. when people
> > use extern) It might end up being quite a lot of work to clean this up.
>
> If it gave a useful error message rather than an ICE, that'd be a
> feature.
Well you can use a lint program to catch these things. Pretty much
all lints do whole program analysis for types. Perhaps it would
be a good idea to adopt one for the kernel. The best one is unfortunately
not free.
Or just never put an extern into any .c file and set some linker
options that make sure that double definitions without extern
error out (not sure that's possible, but it might be)
-Andi
-
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/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]