This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFA: SIG_ERR in libf2c/libU77
- To: msokolov at ivan dot Harhan dot ORG (Michael Sokolov)
- Subject: Re: RFA: SIG_ERR in libf2c/libU77
- From: Fergus Henderson <fjh at cs dot mu dot oz dot au>
- Date: Mon, 22 Jan 2001 13:29:23 +1100
- Cc: gcc-patches at gcc dot gnu dot org
- References: <0101220043.AA21087@ivan.Harhan.ORG>
On 26-Feb-2037, Michael Sokolov <msokolov@ivan.Harhan.ORG> wrote:
> Zack Weinberg <zackw@stanford.edu> wrote:
>
> > Sorry, no, this is not portable to systems that do define SIG_ERR.
> > SIG_ERR is specified by C99 7.14p3 (and C89) merely as a constant
> > expression of suitable type to be compared to the return value of
> > signal. It is not required to be (void (*)(int)) -1.
> >
> > (Incidentally, you cannot make a legitimate argument for portability
> > based on what is or isn't a system call on one particular platform.)
>
> First, before you start thinking that my argument is based on signal being a
> syscall on 4.3BSD, it isn't. (signal is not a syscall on 4.3BSD, it's a wrapper
> around the BSD sigvec syscall.) With this out of the way, my actual reasoning
> was that signal *was* a syscall when it first saw the light of day, so whatever
> the paperheads and their standards say, it has always returned -1 on error from
> day 0.
Nevertheless, someone might implement a C standard library based on
what the C standard says, without reading or caring about the BSD
manual page for signal(). Your patch breaks gcc. Perhaps the breakage
currently doesn't have any symptom, but it is still wrong.
--
Fergus Henderson <fjh@cs.mu.oz.au> | "I have always known that the pursuit
| of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.