bug-bison
[Top][All Lists]
Advanced

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

Re: bison 1.875 variable vs. function name clash: accept


From: Jonathan Ward
Subject: Re: bison 1.875 variable vs. function name clash: accept
Date: Fri, 16 May 2003 11:21:48 -0400
User-agent: KMail/1.5

>If it isn't included, then it shouldn't be a problem, right?  Let's
>wait until someone runs into a real problem before worrying about
>this.  There are lots of system headers that declare a lot of
>identifiers, but we shouldn't have to worry about clashes unless we
>actually include the headers.

The problem is that the linker is where the problem is not the compiler.  
accept() is defined in libc on most OSes, as a result it 
is still visible to the linker even if it is not visible to the compiler.  
The SYSV runtime environment does not distinuguish between global variables 
and functions when attempting to resolve.  If you try building bison on HP-UX 
you will see a warning from the linker telling you that it chose the FUNCTION 
to resolve a collision for "accept".  I have already posted a patch to the 
patch mailing list based on the latest CVS sources.

-- 
Jonathan Ward
Partner Technology Access Center MA
Hewlett-Packard Company
550 King St, LKG2A-X2
Littleton, MA 01460
978.506.5338




reply via email to

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