This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[OFFTOPIC?] Failure to ``gcc -ansi'' build in tcl/tk 8.0.4



Just since egcs-1.1.2 is about to come out, I started investigating the -ansi 
flag a little using egcs-1.1.1 under Solaris 2.6. I tried tcl/tk 8.0.4 since 
it might be quite ansified due to its ``portable'' (well to great parts) 
source code.

I had problems with generic/tclExecute.c and unix/tclUnixSock.c despite the 
fact that

bash$ printenv CC
gcc -pedantic -ansi -Wall -W
bash$ 

however, tk compiled just fine. (Loads of warnings due to default return type 
`int' in X of openwin...)

Now, my question; are these errors in the source code or the configure script 
or perhaps related to the egcs C ANSI compiler? Have I missed some important 
information here?

TIA,

/ChJ

PS. The logs...

gcc -pedantic -ansi -Wall -W -c -O   -I./../generic -I. -DHAVE_GETCWD=1 -DHAVE_U
NISTD_H=1 -DUSE_TERMIOS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_TZNA
ME=1 -DHAVE_TIMEZONE_VAR=1 -DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1 -DNO_UNION_WAIT=
1 -DRETSIGTYPE=void -DHAVE_SIGNED_CHAR=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_FILIO_H
=1        -DTCL_SHLIB_EXT=\".so\" ./../generic/tclExecute.c
./../generic/tclExecute.c:328: `hypot' undeclared here (not in a function)
./../generic/tclExecute.c:328: initializer element for `builtinFuncTable[10].cli
entData' is not constant
./../generic/tclExecute.c:344: warning: missing initializer for `builtinFuncTabl
e[25].numArgs'
./../generic/tclExecute.c: In function `ExprAbsFunc':
./../generic/tclExecute.c:3683: warning: unused parameter `clientData'
./../generic/tclExecute.c: In function `ExprDoubleFunc':
./../generic/tclExecute.c:3777: warning: unused parameter `clientData'
./../generic/tclExecute.c: In function `ExprIntFunc':
./../generic/tclExecute.c:3841: warning: unused parameter `clientData'
./../generic/tclExecute.c: In function `ExprRandFunc':
./../generic/tclExecute.c:3934: warning: unused parameter `clientData'
./../generic/tclExecute.c: In function `ExprRoundFunc':
./../generic/tclExecute.c:4022: warning: unused parameter `clientData'
./../generic/tclExecute.c: In function `UpdateStringOfCmdName':
./../generic/tclExecute.c:4883: warning: unused parameter `objPtr'
make: *** [tclExecute.o] Error 1

gcc -pedantic -ansi -Wall -W -c -O   -I./../generic -I. -DHAVE_GETCWD=1 -DHAVE_UNISTD_H=1 -DUSE_TERMIOS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_TIMEZONE_VAR=1 -DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1 -DNO_UNION_WAIT=1 -DRETSIGTYPE=void -DHAVE_SIGNED_CHAR=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_FILIO_H=1        -DTCL_SHLIB_EXT=\".so\" ./tclUnixSock.c
gcc -pedantic -ansi -Wall -W -c -O   -I./../generic -I. -DHAVE_GETCWD=1 -DHAVE_UNISTD_H=1 -DUSE_TERMIOS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_TIMEZONE_VAR=1 -DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1 -DNO_UNION_WAIT=1 -DRETSIGTYPE=void -DHAVE_SIGNED_CHAR=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_FILIO_H=1        -DTCL_SHLIB_EXT=\".so\" ./tclUnixTime.c
./tclUnixTime.c: In function `TclpGetTimeZone':
./tclUnixTime.c:171: warning: implicit declaration of function `tzset'
./tclUnixTime.c:180: `timezone' undeclared (first use in this function)
./tclUnixTime.c:180: (Each undeclared identifier is reported only once
./tclUnixTime.c:180: for each function it appears in.)
./tclUnixTime.c:102: warning: unused parameter `currentTime'
./tclUnixTime.c:168: warning: `timeZone' might be used uninitialized in this function
make: *** [tclUnixTime.o] Error 1




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]