Summary: | CNI: would be nice to be able to create Java array with 'new' | ||
---|---|---|---|
Product: | gcc | Reporter: | ashley |
Component: | java | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED WONTFIX | ||
Severity: | enhancement | CC: | bryce, gcc-bugs, java-prs |
Priority: | P3 | ||
Version: | 3.0.1 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2005-09-23 22:56:07 | |
Bug Depends on: | 11006 | ||
Bug Blocks: |
Description
ashley
2001-10-01 23:16:02 UTC
Fix: no idea State-Changed-From-To: open->analyzed State-Changed-Why: Not a bug. Please re-read the CNI documentation at http://gcc.gnu.org/java/papers/cni/t1.html to see how to create a Java array from C++. However, it would be nice if CNI did support this syntax. Possibly we can implement it with operator overloading. Changing category to libgcj and filing as change-request. It would be nice for this feature but it still segfaults which is clearly a bug, I will file it seperately. Please review the code. "new jboolean[1]" is _not_ attempting to create a new Java array, it should create a new C++ array (of one element, in this case) that happens to be of a Java primitive type, similar to "new short[1]". See C++ ARM sec. 5.3.3. This is a bug relating to ordinary C++, not a suggestion for clever integration with Java. Andrew's report about the ICE is PR 11006 and thus covered elsewhere. It has nothing to do with arrays, just with a bad interaction between C++ and java builtin types. In effect, this report is now only about the Java array stuff. W. Closing as won't fix as the Java front-end has been removed from the trunk. |