Re: [TRIVIAL] strlen("literal string") -> (sizeof("literal string")-1)

From: Jakub Jelinek (jakub@redhat.com)
Date: Thu Aug 29 2002 - 02:10:08 EST


On Thu, Aug 29, 2002 at 04:29:04PM +1000, Rusty Russell wrote:
> In message <20020829032642.GA9201@nevyn.them.org> you write:
> > Also disagree; besides, the evidence implies that Keith is wrong. GCC
> > 2.95.3:
>
> i386, m68k, s390 and s390x define inline strlen() versions, so they
> are don't optimize strlen("literal").
>
> This premature optimization should probably be fixed,

Well, IMHO at least for the more recent GCC versions kernel
should leave the job to GCC (ie. either just prototype str* functions,
or define them to __builtin_str* variants).

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



This archive was generated by hypermail 2b29 : Sat Aug 31 2002 - 22:00:26 EST