On 27 April 2013 09:06, Kenneth R Westerback <kwesterb...@rogers.com> wrote:
> On Sat, Apr 27, 2013 at 08:10:41AM +0200, Otto Moerbeek wrote:
>> On Sat, Apr 27, 2013 at 01:08:06AM -0400, Eitan Adler wrote:
>>
>> > Hey all,
>> >
>> > Time for attempt #2!
>> >
>> > Adding static to internal function allows the compiler to better
>> > detect dead code (functions, variables, etc) and makes it easier for
>> > the compiler to optimize; e.g., since it knows a function will only
>> > called once it can inline code; or not output a symbol for a certain
>> > function.
>>
>> In general we don't lik this because it makes things harder to debug.
>> For libraries, yes, but for programs, no.
>>
>>       -Otto
>
> +1. We see way more 'nuke stupid static crap' diffs that 'add static'
> diffs. We are even dubious about almost all inline functions since
> they are also harder to debug and (on most 'modern' archs) add
> little if any performance but do make executables bigger. Just in
> case you have a 'use inline functions to speed things up just like
> XBSD' diff in the queue, and were about to hit another sensitive
> button issue. :-)

Most of my diffs are "take recent^W changes from the other BSDs if
they are useful".

FWIW I don't believe this sort of patch significantly affects
debugging because that should be done with -O0 -g anyways.

That said, thanks for the info.  If I have other diffs which are more
suitable to OpenBSD I'll be sure to send them.  Most the remainder are
similar cleanup or non-POSIX feature-adds.

-- 
Eitan Adler

Reply via email to