diff options
Diffstat (limited to 'gcc/java/gjavah.c')
-rw-r--r-- | gcc/java/gjavah.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/java/gjavah.c b/gcc/java/gjavah.c index 7248775..1e93dde 100644 --- a/gcc/java/gjavah.c +++ b/gcc/java/gjavah.c @@ -1065,7 +1065,10 @@ decompile_method (out, jcf, code_len) } else if (code_len == 2 && codes[0] == OPCODE_aload_0 - && codes[1] == OPCODE_areturn) + && codes[1] == OPCODE_areturn + /* We're going to generate `return this'. This only makes + sense for non-static methods. */ + && ! (method_access & ACC_STATIC)) { decompile_return_statement (out, jcf, method_signature, -1, JPOOL_USHORT1 (jcf, jcf->this_class)); |