This is the mail archive of the
java-prs@gcc.gnu.org
mailing list for the Java project.
[Bug java/16474] New: gcjh: Illegal C++ produced for some non-gcj bytecode
- From: "mckinlay at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: java-prs at gcc dot gnu dot org
- Date: 11 Jul 2004 17:40:45 -0000
- Subject: [Bug java/16474] New: gcjh: Illegal C++ produced for some non-gcj bytecode
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
When producing header files from bytecode produced by ecj, gcjh can emit invalid
C++ headers. For example, given the following code in libgcj,
public class SimpleSHSStream extends java.io.DataOutputStream
{
int counter;
final int SHS_BLOCKSIZE = 64;
final int SHS_DIGESTSIZE = 20;
gcjh will emit:
public:
const jint SHS_BLOCKSIZE = 64L;
const jint SHS_DIGESTSIZE = 20L;
But this is illegal ISO C++:
./gnu/gcj/io/SimpleSHSStream.h:40: error: ISO C++ forbids initialization of
member `SHS_BLOCKSIZE'
./gnu/gcj/io/SimpleSHSStream.h:40: error: making `SHS_BLOCKSIZE' static
./gnu/gcj/io/SimpleSHSStream.h:41: error: ISO C++ forbids initialization of
member `SHS_DIGESTSIZE'
./gnu/gcj/io/SimpleSHSStream.h:41: error: making `SHS_DIGESTSIZE' static
--
Summary: gcjh: Illegal C++ produced for some non-gcj bytecode
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mckinlay at redhat dot com
CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16474