>Yes, there are a number of standard library and system functions which >could or should have their return types const-qualified but don't. >Historical and conformance reasons, of course, but it makes >-Wwrite-strings and similar options rather useless.
The C standards folks aren't that stupid. The function should not have their return values const qualified because in the majority of cases: - the argument isn't const - the return value is going to be modified. The const qualifier for the argument is merely stating that the function itself will not modify the argument. It does, unfortunately, give a typing hole as you can convert const char * to char * using strchr() and others. Casper _______________________________________________ opensolaris-discuss mailing list opensolaris-discuss@opensolaris.org