Quote Originally Posted by laserlight
The idea is that the user of the function does not care whether or not the parameter is const since either way due to pass by value it will not affect the caller's copy of the value. The implementor might care since it is a reminder that the value should not be modified.
That's great except why does the compiler complain if compiling and linking are done in separate steps? Actually, I just discovered the Sun compiler complains, but not the gnu compiler. So it appears maybe this is an issue with the Sun compiler. That might also explain the inconsistency between debug and non-debug modes.