public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/16474] New: gcjh: Illegal C++ produced for some non-gcj bytecode
@ 2004-07-11 17:40 mckinlay at redhat dot com
  2004-07-12  5:51 ` [Bug java/16474] " pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: mckinlay at redhat dot com @ 2004-07-11 17:40 UTC (permalink / raw)
  To: java-prs

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-07-12 18:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-11 17:40 [Bug java/16474] New: gcjh: Illegal C++ produced for some non-gcj bytecode mckinlay at redhat dot com
2004-07-12  5:51 ` [Bug java/16474] " pinskia at gcc dot gnu dot org
2004-07-12 18:06 ` cvs-commit at gcc dot gnu dot org
2004-07-12 18:13 ` mckinlay at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).