From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <202e755259972d59e6fd987f6ff698d9.axp-list@archive.invalid> X-Archive-Original-Message-ID: <1.5.4.32.19970218165455.00677480@mail.nwlink.com> Date: Tue, 18 Feb 1997 14:11:46 -0500 (EST) From: Mark Hamstra Subject: Re: fclose() On Tue, 18 Feb 1997, Uncle George wrote: > I can only say that the analogy is the same with fclose(). I expect > fclose to give me an error return - something more gracefull than a > segfault. Fclose should know that the ptr is invalid - points to no open > channel - and give an appropiate error code. The only error POSIX compliant fclose() can return is EOF, which is not appropriate in the case of this type of programmer error. I suppose you could make a case that your compiler should return a warning or error, but to change fclose() to return what you think is an appropriate error at runtime is at least as wrong as depending upon what is specified as undefined behaviour. Mark Hamstra Bentley Systems, Inc. -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com