C
Chuck F.
I am confused by this implementation of successive src tests.
Are you expecting it to be possible to set src = (char *)
((NULL) - (int)k) or something? The chances that that means
something on a platform seems pretty low. Why wouldn't you just
hoist out the "if (src)" test? (Attention Edward G. Niles: use
my second sentence to determine *WHY* the C compiler cannot do
the hoist automatically.)
Why are you proposing such undefined behavior operations? No sane
programmer would ever pass such a parameter.
Among other things it caters to passing NULL as the src parameter,
and treats it as an empty string. Download the source for some
implications and requirements. The code has been minimized in
anticipation of embedded system use with non-optimizing compilers.
--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
More details at: <http://cfaj.freeshell.org/google/>