aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorBryce McKinlay <mckinlay@redhat.com>2004-07-12 18:06:03 +0000
committerBryce McKinlay <bryce@gcc.gnu.org>2004-07-12 19:06:03 +0100
commitdd4e150058df2a052cba522bff881d4ba618ab7a (patch)
tree2f4dcffdd3a7055c3823552e7ea2b2a016c46be3 /gcc
parentfdbda73fc7222a5e0c58c3f77e15b95513d58df1 (diff)
downloadgcc-dd4e150058df2a052cba522bff881d4ba618ab7a.zip
gcc-dd4e150058df2a052cba522bff881d4ba618ab7a.tar.gz
gcc-dd4e150058df2a052cba522bff881d4ba618ab7a.tar.bz2
re PR java/16474 (gcjh: Illegal C++ produced for some non-gcj bytecode)
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/java/ChangeLog5
-rw-r--r--gcc/java/gjavah.c7
2 files changed, 8 insertions, 4 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index d73e68d..fe7a4dc 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -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,
diff --git a/gcc/java/gjavah.c b/gcc/java/gjavah.c
index b4e6ca3..6765c16 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;