On 11-Apr-98, 00:12 (CDT), Manoj Srivastava <[EMAIL PROTECTED]> wrote: > Hi, > >>"Gregory" == Gregory S Stark <[EMAIL PROTECTED]> writes: > > Gregory> Manoj Srivastava <[EMAIL PROTECTED]> writes: > >> ---------------------------------------------------------------------- > >> Definitions of terms > >> > >> ... Permissible undefined behaviour ranges from ignoring the > >> situation completely with unpredictable results, to > [snip by sg] > > Firstly, read the whole sentence. > Permissible undefined behaviour ranges from ignoring the situation > completely with unpredictable results > > ignoring the situation completely with unpredictable results > > ignoring the situation completely > > ignoring the situation ... > > get it? If ignoring a second fclose makes monkeys fly out of > your nose, then fine. You have a strange nose.
I think you've misread that sentence. The situation it is permissible to ignore is the fact that a construct invoking undefined behaviour has occurred (e.g. a second call to fclose() with the same FILE *). The library is free to attempt to try to "close" whatever the garbage is pointed to...which may lead to a hard disk re-format, or on certain embedded implementations, monkeys issuing from the nose. I don't *think* the implementation is required to catch the fact that it's an invalid FILE *, and then ignore the attempt to fclose(). This actually *is* almost worth asking on comp.std.c; I've never interpeted that sentence the way you're interpeting it, but I can see your point of view. steve -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]