tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: constify dirname/basename [was: CVS commit: src]

On Thu, May 01, 2008 at 10:55:17PM +0900, Neil Booth wrote:
 > > Whether or not standards technically allow it, user code should never
 > > do that.
 > Indeed, C99 Example 7.1.4p5 that explicitly lists such a construct
 > as an example of how to use standard library functions was clearly
 > mistaken, then.

The examples in the C standard are not normative. Perhaps you meant to
cite 7.1.4p2? But that's not the same case, and it wouldn't fail. (It
might fail in C++, but I rather doubt it's legal there.) Also, we
aren't talking about a function defined by C99.

(For that matter, by any commonly accepted measure of sanity, 7.1.4p2
*is* mistaken. But all that proves is that sanity and standards don't

The function pointer argument in your other post, however, is
reasonable, so the rest is moot.

David A. Holland

Home | Main Index | Thread Index | Old Index