On Dec 21, 12:21am, Peter Seebach wrote:
} In message <200507311038.j6VAcG1N005696@vtn1.victoria.tc.ca>, John Nemeth write
} s:
} > On every system with which I'm famailiar, library calls are
} >regular functions and have no magic. Admittedly, my experience is
} >limited to general purpose computers for the most part.
}
} Well, as an obvious example, some versions of the UnixWare compiler
} translate strcpy calls into x86 string manipulation functions. For an
} even more interesting example, gcc can turn some trivial printf calls
} into puts calls!
Hmm, yes I vaguely recall a debate on the lists about this
centreing around how we handle NULL pointers being passed to puts(). I
wasn't particularly interested in that debate, so I wasn't really
paying attention to it.
It's debatable whether compilers should be doing this sort of
thing. On the one hand, it helps to optimise code. On the other, it
can make things more tricky. I'm guessing that the standard allows the
compiler to do things like this? Actually, I'm guessing the standard
considers the compiler and libc to be parts of the same package?
}-- End of excerpt from Peter Seebach