Ulrich Drepper wrote: > > > While errno is not a simple variable, compilers are smart enough to > > treat it as if it is a simple variable, so just 'return errno' works > > everywhere. > > Wrong. errno is in fact on most systems a hidden function call and the > C language does not have any provisions to say that a function call can > be eliminated because it always returns the same value and has no side > effects. We have such a feature in gcc but it's not evailable > everywhere. >
If 'errno' is a function call, how the heck does 'errno = 0;' do anything? If it works because the compiler/system treats errno as a integral value, then everything else is moot. -- =========================================================================== Jim Jagielski [|] [EMAIL PROTECTED] [|] http://www.jaguNET.com/ "A society that will trade a little liberty for a little order will lose both and deserve neither" - T.Jefferson
