bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: accept is both an API and a variable.


From: Paul Eggert
Subject: Re: accept is both an API and a variable.
Date: 16 May 2003 22:32:49 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Jonathan Ward <address@hidden> writes:

> POSIX.1 defines accept as a C API, several of the files are using it
> as a global variable.  The resulting behavior on SYSV environments
> is undefined.

Can you give a specific example of the problem?

I'd rather not rename Bison variables simply because some random
header somewhere -- a header that Bison does not include -- might want
to define them to be something else.  I'd rather understand the root
of the problem first.

The C Standard says that if you don't include a header, then you don't
need to worry about the external symbols that it declares, unless the
header is one specified by the C Standard.  Thus the following program
is a strictly conforming C program, and must work on any conforming C
implementation:

  int accept = 0;
  int main (void) { return accept; }

since no Standard C header defines "accept".

The above program works correctly on my SYSV environment (Solaris 8,
GCC 2.95.3).  Does it work for you?  If so, why does it work while
Bison does not?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]