musl/src/string/strlen.c, branch master musl - an implementation of the standard library for Linux-based systems fix aliasing-based undefined behavior in string functions 2018年09月26日T18:39:10+00:00 Rich Felker dalias@aerifal.cx 2018年09月26日T18:39:10+00:00 4d0a82170a25464c39522d7190b9fe302045ddb2 use the GNU C may_alias attribute if available, and fallback to naive byte-by-byte loops if __GNUC__ is not defined. this patch has been written to minimize changes so that history remains reviewable; it does not attempt to bring the affected code into a more consistent or elegant form.
use the GNU C may_alias attribute if available, and fallback to naive
byte-by-byte loops if __GNUC__ is not defined.
this patch has been written to minimize changes so that history
remains reviewable; it does not attempt to bring the affected code
into a more consistent or elegant form.
include cleanups: remove unused headers and add feature test macros 2013年12月12日T05:09:18+00:00 Szabolcs Nagy nsz@port70.net 2013年12月12日T05:09:18+00:00 571744447c23f91feb6439948f3a619aca850dfb
slightly cleaner strlen, also seems to compile to better code 2012年09月27日T20:56:33+00:00 Rich Felker dalias@aerifal.cx 2012年09月27日T20:56:33+00:00 3f9ff1514e49b06c20a61af9ae9e52bd53b48d9a testing with gcc 4.6.3 on x86, -Os, the old version does a duplicate null byte check after the first loop. this is purely the compiler being stupid, but the old code was also stupid and unintuitive in how it expressed the check.
testing with gcc 4.6.3 on x86, -Os, the old version does a duplicate
null byte check after the first loop. this is purely the compiler
being stupid, but the old code was also stupid and unintuitive in how
it expressed the check.
initial check-in, version 0.5.0 2011年02月12日T05:22:29+00:00 Rich Felker dalias@aerifal.cx 2011年02月12日T05:22:29+00:00 0b44a0315b47dd8eced9f3b7f31580cf14bbfc01

AltStyle によって変換されたページ (->オリジナル) /