Re: [PATCH] Generic dead function optimisation

From: Martin Mares (
Date: Tue Apr 25 2000 - 07:51:59 EST


> Not only that, it violates longstanding C semantics.
> "static" => "can not be referenced outside this compilation unit"
> "EXPORT_SYMBOL" => "can be referenced outside this compilation unit"

If "referenced" means "referenced by its name" and not "called", then
yes. But the EXPORT_SYMBOL case is equivalent to making a non-static
data structure contain a pointer to your static function which is
perfectly normal C. For example:

        static void f(void)

        void (*pf)(void) = f;

and then (in another compilation unit)


is obviously correct.

                                Have a nice fortnight

Martin `MJ' Mares <> <>
"ADA -- A Dumb Acronym"

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to Please read the FAQ at

This archive was generated by hypermail 2b29 : Sun Apr 30 2000 - 21:00:09 EST