From dd4e150058df2a052cba522bff881d4ba618ab7a Mon Sep 17 00:00:00 2001 From: Bryce McKinlay Date: Mon, 12 Jul 2004 18:06:03 +0000 Subject: [PATCH] re PR java/16474 (gcjh: Illegal C++ produced for some non-gcj bytecode) 2004-07-12 Bryce McKinlay PR java/16474 gjavah.c (print_field_info): Emit constant only if field is static. From-SVN: r84570 --- gcc/java/ChangeLog | 5 +++++ gcc/java/gjavah.c | 7 +++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index d73e68df601..fe7a4dcf623 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,8 @@ +2004-07-12 Bryce McKinlay + + PR java/16474 + gjavah.c (print_field_info): Emit constant only if field is static. + 2004-07-11 Roger Sayle * expr.c (java_truthvalue_conversion, flush_quick_stack, diff --git a/gcc/java/gjavah.c b/gcc/java/gjavah.c index b4e6ca3128e..6765c161ff3 100644 --- a/gcc/java/gjavah.c +++ b/gcc/java/gjavah.c @@ -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; -- 2.30.2