Mail Archives: djgpp-workers/2003/11/09/14:14:07
Hello.
In a message dated 11/9/2003 5:10:17 AM Eastern Standard Time,
rich AT phekda DOT freeserve DOT co DOT uk writes:
>
> >Thereafter, it cannot be
> >reset; any attempt to do so at runtime either by resetting the global
> >variable or by calling set_math_errhandling() again will fail.
>
> It won't fail. The change will just be ignored. E.g.:
>
> some_maths_function();
> math_errhandling = MATH_ERRNO;
>
> That doesn't change the permanent setting of math_errhandling, maintained
> in errhndlr.o. Indeed, the next call to any math function that uses one
> of the functions in errhndlr.o will cause the contents of math_errhandling
> to be replaced by its original value.
I think we're talking at cross-purposes here. Yes, I understand that. I don't
like that behaviour. It's non-obvious what's going on.
The caller can still try to set the global variable. Then the developer will
wonder why it doesn't work. Hence comp.os.msdos.djgpp gets bombarded with user
questions on this issue.
Just because the C standard says the variable should not be modified after
program start doesn't mean that users won't try to. How many people try
fflush(stdin) to clear the waiting input and then wonder why it doesn't work?
Would it help if I sent a patch to implement math_errhandling the way I'm
thinking of?
Thanks, bye, Rich =]
--
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]
"You can't evaluate a man by logic alone." -- McCoy, "I, Mudd", Star Trek
- Raw text -