Andrew Haley writes: > On 04/11/2012 01:43 PM, Richard Guenther wrote: >> This breaks bootstrap for me: >> >> In file included from >> /space/rguenther/src/svn/trunk/gcc/java/jcf-parse.c:1009:0: >> /space/rguenther/src/svn/trunk/gcc/java/jcf-reader.c:550:1: error: >> 'int jcf_parse_bootstrap_methods(JCF*, int)' defined but not used >> [-Werror=unused-function] >> jcf_parse_bootstrap_methods (JCF* jcf, int attribute_length ATTRIBUTE_UNUSED) >> ^ >> cc1plus: all warnings being treated as errors >> make[3]: *** [java/jcf-parse.o] Error 1 >> make[3]: *** Waiting for unfinished jobs.... >> > > Sorry. It also broke Java bootstrap on 32-bit targets: /vol/gcc/src/hg/trunk/solaris/gcc/java/jcf-dump.c: In function 'void print_constant(std::FILE*, JCF*, int, int)': /vol/gcc/src/hg/trunk/solaris/gcc/java/jcf-dump.c:929:64: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'uint32 {aka unsigned int}' [-Werror=format] fprintf (out, "Fieldref: %ld=", JPOOL_USHORT2 (jcf, index)); ^ /vol/gcc/src/hg/trunk/solaris/gcc/java/jcf-dump.c:936:65: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'uint32 {aka unsigned int}' [-Werror=format] fprintf (out, "Methodref: %ld=", JPOOL_USHORT2 (jcf, index)); ^ /vol/gcc/src/hg/trunk/solaris/gcc/java/jcf-dump.c:941:74: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'uint32 {aka unsigned int}' [-Werror=format] fprintf (out, "InterfaceMethodref: %ld=", JPOOL_USHORT2 (jcf, index)); ^ /vol/gcc/src/hg/trunk/solaris/gcc/java/jcf-dump.c:949:62: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'uint32 {aka unsigned int}' [-Werror=format] fprintf (out, "MethodType %ld: ", JPOOL_USHORT1 (jcf, index)); ^ /vol/gcc/src/hg/trunk/solaris/gcc/java/jcf-dump.c:957:68: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'uint32 {aka unsigned int}' [-Werror=format] fprintf (out, "bootstrap_method: %ld ", JPOOL_USHORT1 (jcf, index)); ^ The following patch got me into stage3 on i386-pc-solaris2.10 and amd64-pc-solaris2.10. Ok for mainline? Rainer 2012-04-11 Rainer Orth * jcf-dump.c (print_constant): Cast JPOOL_USHORT2, JPOOL_USHORT1 results to long to match formats.