Where is conflict with conflicting types?
robert.lopez@abq.sc.philips.com
robert.lopez@abq.sc.philips.com
Fri Mar 2 09:43:00 GMT 2001
My question is what is in conflict when there are
warnings with respect to conflicting types and what
if anything whould I be doing about the warnings?
My secondary concern is how reliable/trustworthy
is the compiler which results after warnings such
as I show below? I understand they are warnings and
not errors. But the system is having a lot of shared
memory problems and I am not looking at every thing
I can to find possible causes.
When building a new gcc-2.95.2 on a HP-UX 11 system there are warnings such as
In file included from ../../libiberty/../include/obstack.h:145,
from ../../libiberty/obstack.c:27:
/usr/local/lib/gcc-lib/hppa2.0w-hp-hpux11.00/2.95.2/include/string.h:29: \
warning: conflicting types for built-in function `memcmp'
/usr/local/lib/gcc-lib/hppa2.0w-hp-hpux11.00/2.95.2/include/string.h:85: \
warning: conflicting types for built-in function `memcpy'
/usr/local/lib/gcc-lib/hppa2.0w-hp-hpux11.00/2.95.2/include/string.h:87: \
warning: conflicting types for built-in function `memset'
or similarly
In file included from ../../../gcc/fixinc/gnu-regex.c:120:
/usr/local/lib/gcc-lib/hppa2.0w-hp-hpux11.00/2.95.2/include/string.h:29:\
warning: conflicting types for built-in function `memcmp'
/usr/local/lib/gcc-lib/hppa2.0w-hp-hpux11.00/2.95.2/include/string.h:33:\
warning: conflicting types for built-in function `strcpy'
/usr/local/lib/gcc-lib/hppa2.0w-hp-hpux11.00/2.95.2/include/string.h:36:\
warning: conflicting types for built-in function `strcmp'
/usr/local/lib/gcc-lib/hppa2.0w-hp-hpux11.00/2.95.2/include/string.h:85:\
warning: conflicting types for built-in function `memcpy'
which did occur not only from those but also from
../../libiberty/obstack.c,
../../../texinfo/intl/l10nflist.c,
../../../texinfo/lib/xstrdup.c,
obstack.c,
alloca.c,
../../../gcc/fixinc/gnu-regex.c,
../../../libio/iogetline.c,
../../../libio/strops.c,
../../../libio/iofputs.c,
../../../libio/ioperror.c,
../../../libio/ioputs.c,
../../../libio/isgetline.cc,
../../../../libf2c/libU77/getcwd_.c,
../../../../libf2c/libU77/hostnm_.c,
../../../libchill/writerecord.c,
../../../../libio/dbz/case.c,
Also there are warnings that appear related that are
In file included from ../../../libio/isgetline.cc:27:
/home/gnu/build/gcc-2.95.2/+build/gcc/include/string.h:29: \
warning: declaration of `int memcmp(const void *, const void *, long unsigned int)'
/home/gnu/build/gcc-2.95.2/+build/gcc/include/string.h:29: \
warning: conflicts with built-in declaration `int memcmp(const void *, const void *, unsigned int)'
/home/gnu/build/gcc-2.95.2/+build/gcc/include/string.h:85: \
warning: declaration of `void * memcpy(void *, const void *, long unsigned int)'
/home/gnu/build/gcc-2.95.2/+build/gcc/include/string.h:85: \
warning: conflicts with built-in declaration `void * memcpy(void *, const void *, unsigned int)'
/home/gnu/build/gcc-2.95.2/+build/gcc/include/string.h:93: \
warning: declaration of `size_t strlen(const char *)'
/home/gnu/build/gcc-2.95.2/+build/gcc/include/string.h:93: \
warning: conflicts with built-in declaration `unsigned int strlen(const char *)'
which also occured from
../../../libio/isgetsb.cc,
from ../../../libio/stream.cc,
../../../libio/streambuf.cc,
../../../libio/strstream.cc,
../../../libstdc++/cstringi.cc,
The only other warnings are a generous number of
cc1: warning: -g is only supported when using GAS on this processor,
cc1: warning: -g option disabled.
which I believe to be of no concern
and
gcc -c -DIN_GCC -O2 -W -Wall -I. -I.. -I../../../gcc/f -I../../../gcc/f/.. -I../../../gcc/f/../config -I../../../gcc/f/../../include ../../../gcc/f/com.c
../../../gcc/f/com.c: In function `ffecom_possible_partial_overlap_':
../../../gcc/f/com.c:1599: warning: unused parameter `expr2'
../../../gcc/f/com.c: In function `type_for_mode':
../../../gcc/f/com.c:15767: warning: comparison between signed and unsigned
../../../gcc/f/com.c:15770: warning: comparison between signed and unsigned
../../../gcc/f/com.c:15773: warning: comparison between signed and unsigned
../../../gcc/f/com.c:15776: warning: comparison between signed and unsigned
../../../gcc/f/com.c:15779: warning: comparison between signed and unsigned
../../../gcc/f/com.c:15782: warning: comparison between signed and unsigned
../../../gcc/f/com.c:15785: warning: comparison between signed and unsigned
../../../gcc/f/com.c:15788: warning: comparison between signed and unsigned
../../../gcc/f/com.c:15791: warning: comparison between signed and unsigned
../../../gcc/f/com.c:15798: warning: comparison between signed and unsigned
and
gcc -c -DMAIN -DIN_GCC -DHAIFA -O2 -DHAVE_CONFIG_H -I. -I../../gcc -I../../gcc/config -I../../gcc/../include \
-DVERSION=\"2.95.2\" cxxmain.c
cxxmain.c: In function `main':
cxxmain.c:4527: warning: assignment discards qualifiers from pointer target type
cxxmain.c:4530: warning: assignment discards qualifiers from pointer target
type
gcc -DHAVE_CONFIG_H -O2 -I.. -I../../../libiberty/testsuite/../../include -o test-filter -DMAIN -DVERSION='"none"' -DHAVE_CONFIG_H \
../../../libiberty/testsuite/../cplus-dem.c test-us.c -L.. -liberty
../../../libiberty/testsuite/../cplus-dem.c: In function `main':
../../../libiberty/testsuite/../cplus-dem.c:4527: warning: assignment discards qualifiers from pointer target type
../../../libiberty/testsuite/../cplus-dem.c:4530: warning: assignment discards
qualifiers from pointer target type
I also get a number of expect warnings such as these from "make check"
which I expect because I could not build a working expect or DejaGnu
on this system. It was problems with builds such as these that finally
sent me back to rebuild the compiler.
EXPECT=`if [ -f ${rootme}/../../../expect/expect ] ;\
then echo ${rootme}/../../../expect/expect ; \
else echo expect ; fi` ; export EXPECT ; \
if [ -f ${rootme}/../../../expect/expect ] ; then \
TCL_LIBRARY=${srcdir}/../../tcl/library ; \
export TCL_LIBRARY ; fi ; \
` if [ -f ${srcdir}/../../dejagnu/runtest ]; \
then echo ${srcdir}/../../dejagnu/runtest; \
else if [ "hppa2.0w-hp-hpux11.00" = "hppa2.0w-hp-hpux11.00" ]; \
then echo runtest; else t=''; echo runtest | sed -e '' $t; fi; fi`
WARNING: Couldn't find the global config file.
Test Run By gnu on Fri Mar 2 09:53:24 2001
Native configuration is hppa2.0w-hp-hpux11.00
Lastly there is also this from "make check":
Running ../../../../libio/testsuite/libio.tests/tiformat.exp ...
FAIL: tiformat.c compilation
../../../../libf2c/libU77/u77-test.f: In program `MAIN__':
../../../../libf2c/libU77/u77-test.f:214: warning:
call idate (i,j,k)
^
Intrinsic `IDATE', invoked at (^), known to be non-Y2K-compliant [info -f g77 M Y2KBAD]
../../../../libf2c/libU77/u77-test.f:223: warning:
call date (ctim)
^
Intrinsic `DATE', invoked at (^), known to be non-Y2K-compliant [info -f g77 M Y2KBAD]
1 GNU libU77 test at: Fri Mar 2 09:54:22 2001
More information about the Gcc-help
mailing list