Re: static int __init foobar_init(void) {}

From: Jeff Garzik (jgarzik@mandrakesoft.mandrakesoft.com)
Date: Mon Mar 13 2000 - 10:06:25 EST


On Mon, 13 Mar 2000, David Woodhouse wrote:
> viro@math.psu.edu said:
> > Could gcc folks comment on that? IMO counting alias as valid use is a
> > reasonable idea...

> Can we get away with just adding __attribute(unused) to the __init and __exit
> macros?

Regardless of whether this works or not, they are NOT unused, therefore
this is wrong... From a maintenance standpoint, somebody might come
through the code, say "hmm this is unused eh?" and delete it. From a
gcc standpoint, the compiler might change such that __unused__ code is
never output, which would be equally bad.

        Jeff

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Mar 15 2000 - 21:00:24 EST