This is the mail archive of the
mailing list for the GCC project.
Re: 3.3.4 build report: powerpc-ibm-aix18.104.22.168
On Thu, Jun 03, 2004 at 09:20:01PM +0200, Gabriel Dos Reis wrote:
> Joe Buck <Joe.Buck@synopsys.COM> writes:
> | I built 3.3.4 for AIX 4.3.3 (powerpc-ibm-aix22.214.171.124), using
> | the vendor cc, as, and ld. Results are at
> | http://gcc.gnu.org/ml/gcc-testresults/2004-06/msg00101.html .
> Thanks for the report.
> | Java doesn't build on this platform.
> | I had to use --disable-nls to get a successful build. Without this flag,
> | I got the following failure in the gcc/intl directory:
> | cc -c -DIN_GCC -DLOCALEDIR=\"/u/jbuck/cvs.aix/3.3.4-pre/share/locale\" -DLOCALE_ALIAS_PATH=\"/u/jbuck/cvs.aix/3.3.4-pre/share/locale\" -DLIBDIR=\"/u/jbuck/cvs.aix/3.3.4-pre/lib\" -DHAVE_CONFIG_H -I.. -I. -I/remote/dtg103/jbuck/gnu/src/gcc-3.3.4-20040530/gcc/intl -I/remote/dtg103/jbuck/gnu/src/gcc-3.3.4-20040530/gcc -I/remote/dtg103/jbuck/gnu/src/gcc-3.3.4-20040530/gcc/config -I/remote/dtg103/jbuck/gnu/src/gcc-3.3.4-20040530/gcc/../include -g /remote/dtg103/jbuck/gnu/src/gcc-3.3.4-20040530/gcc/intl/plural.c -o plural.o
> | "plural.y", line 264.1: 1506-343 (S) Redeclaration of __gettextlex differs from previous declaration on line 73 of "plural.y".
> | "plural.y", line 264.1: 1506-381 (I) The type "const unsigned char**" of parameter 2 in the prototype declaration is not compatible with the corresponding parameter type "unsigned char**" in the nonprototype declaration.
> Interesting. From intl/ChangeLog, files in gcc/intl have not been
> changed since 2003-05-13, the release of 3.3.0.
It turns out that this is an AIX cc bug, I believe.
At line 418 we have
static int yylex PARAMS ((YYSTYPE *lval, const char **pexp));
and at line 1177 we have
yylex (lval, pexp)
const char **pexp;
Note that the type of pexp is the same. There is no "unsigned"; perhaps
the compiler is inserting that because char defaults to unsigned, but even
then it seems wrong. But AIX cc is acting like the "const" in the
non-prototype function is not there!
I changed the yylex definition to use a prototype, and AIX cc then
happily built it.
What are the rules on K&R-style definitions? Is const supposed to be
ignored in this context? That can't be right.
This is AIX 4.3.3, "VisualAge C++ Professional / C for AIX Compiler, Version 5"