This is the mail archive of the java-prs@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug java/16474] New: gcjh: Illegal C++ produced for some non-gcj bytecode


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]