public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/16843] New: gcjh generated headers don't define final constants
@ 2004-07-31 10:19 mark at gcc dot gnu dot org
  2004-08-05  6:42 ` [Bug java/16843] " pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: mark at gcc dot gnu dot org @ 2004-07-31 10:19 UTC (permalink / raw)
  To: java-prs

Some JNI header generators like kaffeh output C #defines for final static
(primitive and String) fields. gcjh doesn't do this.

The output of running kaffeh on the following class:

public class T extends Thread
{
  public static final String Hello = "World";
  public static final float f = 1.4f;
  public static final double d = Math.PI;
}

gets you the following defines in T.h:

#define T_MIN_PRIORITY 1
#define T_NORM_PRIORITY 5
#define T_MAX_PRIORITY 10
#define T_Hello "World"
#define T_f 1.4000000e+00
#define T_d 8.6191995128153828e+97

Note that some of these constants come from the super class.
Also note that the float and double results look like bugs in kaffeh.

Unfortunately I cannot find the specification that defines this behaviour.

-- 
           Summary: gcjh generated headers don't define final constants
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mark at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
                    dot org,robilad at kaffe dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16843


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

* [Bug java/16843] gcjh generated headers don't define final constants
  2004-07-31 10:19 [Bug java/16843] New: gcjh generated headers don't define final constants mark at gcc dot gnu dot org
@ 2004-08-05  6:42 ` pinskia at gcc dot gnu dot org
  2004-11-08  6:30 ` tromey at gcc dot gnu dot org
  2004-11-08 18:03 ` cvs-commit at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-05  6:42 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-08-05 06:42 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-08-05 06:42:56
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16843


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

* [Bug java/16843] gcjh generated headers don't define final constants
  2004-07-31 10:19 [Bug java/16843] New: gcjh generated headers don't define final constants mark at gcc dot gnu dot org
  2004-08-05  6:42 ` [Bug java/16843] " pinskia at gcc dot gnu dot org
@ 2004-11-08  6:30 ` tromey at gcc dot gnu dot org
  2004-11-08 18:03 ` cvs-commit at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: tromey at gcc dot gnu dot org @ 2004-11-08  6:30 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From tromey at gcc dot gnu dot org  2004-11-08 06:30 -------
I'm testing a patch to emit those constants defined
in the class itself.  Inherited not constants are
not emitted; this is harder and related to PR 15411
(in both cases we would have to read other class files
and understand inheritance).

Fixing this partially will help at least building
the subversion java bindings.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16843


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

* [Bug java/16843] gcjh generated headers don't define final constants
  2004-07-31 10:19 [Bug java/16843] New: gcjh generated headers don't define final constants mark at gcc dot gnu dot org
  2004-08-05  6:42 ` [Bug java/16843] " pinskia at gcc dot gnu dot org
  2004-11-08  6:30 ` tromey at gcc dot gnu dot org
@ 2004-11-08 18:03 ` cvs-commit at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-11-08 18:03 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-11-08 18:03 -------
Subject: Bug 16843

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	tromey@gcc.gnu.org	2004-11-08 18:03:02

Modified files:
	gcc/java       : ChangeLog gjavah.c 

Log message:
	PR java/16843:
	* gjavah.c (HANDLE_END_FIELD): Call print_field_info when
	generating a JNI header.
	(print_field_info): Handle JNI headers.
	(jni_print_float): Likewise.
	(jni_print_double): Likewise.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/ChangeLog.diff?cvsroot=gcc&r1=1.1494&r2=1.1495
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/gjavah.c.diff?cvsroot=gcc&r1=1.120&r2=1.121



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16843


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

end of thread, other threads:[~2004-11-08 18:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-31 10:19 [Bug java/16843] New: gcjh generated headers don't define final constants mark at gcc dot gnu dot org
2004-08-05  6:42 ` [Bug java/16843] " pinskia at gcc dot gnu dot org
2004-11-08  6:30 ` tromey at gcc dot gnu dot org
2004-11-08 18:03 ` cvs-commit at gcc dot gnu dot org

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).