re PR java/16474 (gcjh: Illegal C++ produced for some non-gcj bytecode)
authorBryce McKinlay <mckinlay@redhat.com>
Mon, 12 Jul 2004 18:06:03 +0000 (18:06 +0000)
committerBryce McKinlay <bryce@gcc.gnu.org>
Mon, 12 Jul 2004 18:06:03 +0000 (19:06 +0100)
2004-07-12  Bryce McKinlay  <mckinlay@redhat.com>

        PR java/16474
        gjavah.c (print_field_info): Emit constant only if field is static.

From-SVN: r84570

gcc/java/ChangeLog
gcc/java/gjavah.c

index d73e68df601536c9a935f55c7ac15f9a8a6e4b1b..fe7a4dcf623f6e1a15e11d8fe6b968a1da05d8d8 100644 (file)
@@ -1,3 +1,8 @@
+2004-07-12  Bryce McKinlay  <mckinlay@redhat.com>
+
+       PR java/16474
+       gjavah.c (print_field_info): Emit constant only if field is static.
+
 2004-07-11  Roger Sayle  <roger@eyesopen.com>
 
        * expr.c (java_truthvalue_conversion, flush_quick_stack,
index b4e6ca3128ef328ed70c6dd3214a19c61cbb4e3b..6765c161ff32ca46a9b21658065dc435a39a1300 100644 (file)
@@ -719,11 +719,10 @@ print_field_info (FILE *stream, JCF* jcf, int name_index, int sig_index,
 
   fputs ("  ", out);
   if ((flags & ACC_STATIC))
-    fputs ("static ", out);
-
-  if ((flags & ACC_FINAL))
     {
-      if (current_field_value > 0)
+      fputs ("static ", out);
+
+      if ((flags & ACC_FINAL) && current_field_value > 0)
        {
          char buffer[25];
          int done = 1;