Skip to content
Tcl Source Code View Ticket
Login

View Ticket

gcc compiler complains about tclDecls.h

Closed / Fixed219047ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 01:09:52
OriginalBugID: 4121 Bug
Version: 8.2.2
SubmitDate: '2000-02-03'
LastModified: '2000-02-05'
Severity: MED
Status: Released
Submitter: techsupp
ChangedBy: hobbs
OS: SunOS
OSVersion: SunOS cotton 5.5.1 Generic_103640-31
Machine: sun4u sparc SUNW,Ultra-30
FixedDate: '2000-02-05'
FixedInVersion: 8.3
ClosedDate: '2000-10-25'


Name:
jeff deifik

Comments:
We are also using tcl with lynx, which is a much older version.
I cannot build the new version of tcl, because I fear the lynx (os)
folks have not sent in the config file diffs...

ReproducibleScript:
file x.c:
#include <stdio.h>
#include <unistd.h>
#include <tcl.h>
main() {}

compile with gcc 2.95.2 19991024 as follows:
gcc -Wall -Wshadow x.c -o x.o

ObservedBehavior:
/usr/local/include/tclDecls.h:544: warning: declaration of `write' shadows 
global declaration
/usr/local/include/tclDecls.h:1418: warning: declaration of `write' shadows
 global declaration

DesiredBehavior:
I don't expect you folks to use variables named 'write' which conflict with a
well known unix system function name.



The user first had FoundIn at 8.0.4, but that's not possible with
tclDecls.h, so they realized it was actually 8.2.2.  The warning
received is no error.  It come from the declaration of Tcl_GetOpenFile
using 'int write' as a variable.  This doesn't even occur on our
Solaris 2.7/gcc build with -Wshadow.  However, I've changed the decl
to use 'int forWriting' instead.

On the other note, we don't have anything in our tcl.m4 for LynxOS. 
-- 02/05/2000 hobbs
welch Closed ticket [219047ffff]. [History diff]2000-10-26 08:34:05
dgp Ticket [219047ffff]: 3 changes [History diff]2001-04-05 06:52:47
Log in (anonymous is fine) to add a comment.