While trying to adapt a patch from GNU classpath to libgcj I found that gcjh was failing to build a CNI header from a class file. I accidently deleted my terminal and lost the command output. So I tried again and the bug seemed to have vanished. After some investigation I found the following: gcjh prints this error "gcjh: static field has same name as method" (see attached testcase) and produces a header file which looks okay. This file contains buggy C++ code because it contains a static variable and a static method with the same name. Make then saw the buggy header file and saw its done, do the next step. gcjh should bail out for real and not generate a buggy output file.
-- Summary: gcjh creates invalid/empty header files Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: java AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: konqueror at gmx dot de CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu dot org GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21245