declarations problem with rs6000-aix
Dave Love
d.love@dl.ac.uk
Fri Apr 30 23:15:00 GMT 1999
On rs6000-ibm-aix4.1.4.0 there are problems with declarations.
Configuring normally `make LANGUAGES=c' yields:
cc -DIN_GCC -g -DHAVE_CONFIG_H -I. -I. -I./config
-DGCC_INCLUDE_DIR=\"/usr/local/lib/gcc-lib/rs6000-ibm-aix4.1.4.0/egcs-2.90.00/include\" -DGPLUSPLUS_INCLUDE_DIR=\"/usr/local/include/g++\" -DOLD_GPLUSPLUS_INCLUDE_DIR=\"/usr/local/lib/g++-include\" -DLOCAL_INCLUDE_DIR=\"/usr/local/include\" -DCROSS_INCLUDE_DIR=\"/usr/local/lib/gcc-lib/rs6000-ibm-aix4.1.4.0/egcs-2.90.00/sys-include\" -DTOOL_INCLUDE_DIR=\"/usr/local/rs6000-ibm-aix4.1.4.0/include\" -c `echo ./cccp.c | sed 's,^\./,,'`
"/usr/include/stdlib.h", line 153.25: 1506-343 (S) Redeclaration of
calloc differs from previous declaration on line 64 of
"./config/rs6000/xm-rs6000.h".
"/usr/include/stdlib.h", line 153.25: 1506-050 (I) Return type "void*"
in redeclaration is not compatible with the previous return type
"unsigned char*".
"/usr/include/stdlib.h", line 155.25: 1506-343 (S) Redeclaration of
malloc differs from previous declaration on line 64 of
"./config/rs6000/xm-rs6000.h".
"/usr/include/stdlib.h", line 155.25: 1506-050 (I) Return type "void*"
in redeclaration is not compatible with the previous return type
"unsigned char*".
"/usr/include/stdlib.h", line 156.25: 1506-343 (S) Redeclaration of
realloc differs from previous declaration on line 64 of
"./config/rs6000/xm-rs6000.h".
"/usr/include/stdlib.h", line 156.25: 1506-050 (I) Return type "void*"
in redeclaration is not compatible with the previous return type
"unsigned char*".
make: The error code from the last command is 1.
because of a test of __STDC__ which the default compiler apparently
doesn't define.
configure has tests for the need for declarations of some of these
(not calloc), but I don't understand how to distinguish build and host
systems unless by checking for compilation with gcc.
Configuring with CC=c89 I get instead:
c89 -DIN_GCC -g -DHAVE_CONFIG_H -I. -I. -I./config
-DGCC_INCLUDE_DIR=\"/usr/local/lib/gcc-lib/rs6000-ibm-aix4.1.4.0/egcs-2.90.00/include\" -DGPLUSPLUS_INCLUDE_DIR=\"/usr/local/include/g++\" -DOLD_GPLUSPLUS_INCLUDE_DIR=\"/usr/local/lib/g++-include\" -DLOCAL_INCLUDE_DIR=\"/usr/local/include\" -DCROSS_INCLUDE_DIR=\"/usr/local/lib/gcc-lib/rs6000-ibm-aix4.1.4.0/egcs-2.90.00/sys-include\" -DTOOL_INCLUDE_DIR=\"/usr/local/rs6000-ibm-aix4.1.4.0/include\" -c `echo ./cccp.c | sed 's,^\./,,'`
"cccp.c", line 573.12: 1506-007 (S) "struct stat" is undefined.
"cccp.c", line 673.10: 1506-007 (S) "struct stat" is undefined.
"cccp.c", line 1294.10: 1506-007 (S) "struct stat" is undefined.
"cccp.c", line 2174.9: 1506-045 (S) Undeclared identifier S_IFMT.
"cccp.c", line 2174.9: 1506-045 (S) Undeclared identifier S_IFREG.
"cccp.c", line 2182.9: 1506-045 (S) Undeclared identifier S_IFDIR.
"cccp.c", line 4569.22: 1506-007 (S) "struct stat" is undefined.
"cccp.c", line 4703.18: 1506-007 (S) "struct stat" is undefined.
"cccp.c", line 4703.18: 1506-007 (S) "struct stat" is undefined.
"cccp.c", line 5061.7: 1506-045 (S) Undeclared identifier S_IFMT.
"cccp.c", line 5061.7: 1506-045 (S) Undeclared identifier S_IFREG.
"cccp.c", line 5070.12: 1506-045 (S) Undeclared identifier S_IFDIR.
"cccp.c", line 5180.16: 1506-022 (S) "st_mode" is not a member of
"struct stat".
"cccp.c", line 5180.7: 1506-045 (S) Undeclared identifier S_IFMT.
"cccp.c", line 5180.7: 1506-045 (S) Undeclared identifier S_IFREG.
"cccp.c", line 5182.22: 1506-022 (S) "st_size" is not a member of
"struct stat".
"cccp.c", line 5183.37: 1506-022 (S) "st_size" is not a member of
"struct stat".
More information about the Gcc-bugs
mailing list