Date: Mon, 01 Sep 2008 12:14:02 +0200 From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no> To: Giorgos Keramidas <keramida@freebsd.org> Cc: Randall Stewart <rrs@freebsd.org>, src-committers@freebsd.org, cvs-all@freebsd.org, cvs-src@freebsd.org Subject: Re: cvs commit: src/sys/netinet sctp_timer.c sctp_timer.h Message-ID: <86abes9nrp.fsf@ds4.des.no> In-Reply-To: <87tzd4n6z8.fsf@kobe.laptop> (Giorgos Keramidas's message of "Fri, 29 Aug 2008 00:51:39 %2B0300") References: <200808282031.m7SKVUdD076580@repoman.freebsd.org> <87tzd4n6z8.fsf@kobe.laptop>
next in thread | previous in thread | raw e-mail | index | archive | help
Giorgos Keramidas <keramida@freebsd.org> writes: > Randall Stewart <rrs@freebsd.org> writes: > > ok, non static the function and put in the .h so when we do INVARANT > > compile the compiler will not dis the function that is not used. Hmm > > maybe I should have made it ifndef INVARIANTs.. Why did you commit this patch when you already knew of a better (and trivial) alternative? > gcc should be smart enough to throw away the non-static function if > SCTP is built into the kernel (and not as a module) *and* there are no > external references from other parts of the source. Absolutely not - gcc has no way of knowing that the function isn't used by something else (like a loadable module) that is linked into the kernel at a later time. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86abes9nrp.fsf>