public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Matthias Klose <doko@ubuntu.com>
To: Mark Wielaard <mark@klomp.org>
Cc: classpath-patches@gnu.org, GCJ-patches <java-patches@gcc.gnu.org>
Subject: Re: [cp-patches] [patch] let gjavah accept -source 1.[567]
Date: Sun, 06 Jan 2013 17:00:00 -0000	[thread overview]
Message-ID: <50E9ADB8.3000700@ubuntu.com> (raw)
In-Reply-To: <20121219173749.GA22367@toonder.wildebeest.org>

[-- Attachment #1: Type: text/plain, Size: 1666 bytes --]

Am 19.12.2012 18:37, schrieb Mark Wielaard:
> On Wed, Dec 19, 2012 at 02:01:10PM +0100, Matthias Klose wrote:
>> Currently gjavah only accepts -source 1.4 and lower, and errors out for any
>> other value. Would it be reasonable to accept higher versions too?
> 
> I think that should be fine for gjavah, I cannot think of something
> in the bytecode that would impact jni/cni header generation.
> 
> But your patch is for gjdoc. There I think there are source constructs
> that might be a problem in newer versions. It should support some of
> the new 1.5 source level features, but I am not sure if it handles
> everything nor whether it handles any 1.6 and 1.7 extensions.
> 
>> Index: classpath/tools/gnu/classpath/tools/gjdoc/Main.java
>> ===================================================================
>> --- classpath/tools/gnu/classpath/tools/gjdoc/Main.java	(Revision 194604)
>> +++ classpath/tools/gnu/classpath/tools/gjdoc/Main.java	(Arbeitskopie)
>> @@ -1339,10 +1310,13 @@
>>              option_source = args[0];
>>              if (!"1.2".equals(option_source)
>>                  && !"1.3".equals(option_source)
>> -                && !"1.4".equals(option_source)) {
>> +                && !"1.4".equals(option_source)
>> +                && !"1.5".equals(option_source)
>> +                && !"1.6".equals(option_source)
>> +                && !"1.7".equals(option_source)) {
> 
> If you really meant gjdoc I think it would be OK to try to accept it,
> but maybe with a warning message that it is untested?

yes, I meant gjdoc. Here is an updated patch.

  Matthias

	* tools/gnu/classpath/tools/gjdoc/Main.java: Accept -source 1.5, 1.6, 1.7.



[-- Attachment #2: libjava-gjdoc.diff --]
[-- Type: text/x-diff, Size: 1215 bytes --]

# DP: Let gjdoc accept -source 1.5|1.6|1.7. Addresses: #678945.

--- a/src/libjava/classpath/tools/gnu/classpath/tools/gjdoc/Main.java
+++ b/src/libjava/classpath/tools/gnu/classpath/tools/gjdoc/Main.java
@@ -1337,12 +1337,17 @@
           void process(String[] args)
           {
             option_source = args[0];
-            if (!"1.2".equals(option_source)
+            if ("1.5".equals(option_source)
+                || "1.6".equals(option_source)
+                || "1.7".equals(option_source)) {
+              System.err.println("WARNING: support for option -source " + option_source + " is experimental");
+            }
+            else if (!"1.2".equals(option_source)
                 && !"1.3".equals(option_source)
                 && !"1.4".equals(option_source)) {
 
-              throw new RuntimeException("Only he following values are currently"
-                                         + " supported for option -source: 1.2, 1.3, 1.4.");
+              throw new RuntimeException("Only the following values are currently"
+                                         + " supported for option -source: 1.2, 1.3, 1.4; experimental: 1.5, 1.6, 1.7.");
             }
           }
         });

  parent reply	other threads:[~2013-01-06 17:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-19 13:01 Matthias Klose
2012-12-19 14:17 ` [cp-patches] " Andrew Hughes
2012-12-19 17:38 ` Mark Wielaard
2012-12-20 15:42   ` Andrew Hughes
2013-01-06 17:00   ` Matthias Klose [this message]
2013-01-07  8:54     ` Mark Wielaard
2013-01-10  9:17       ` Mark Wielaard
2013-01-10 15:20         ` Andrew Hughes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50E9ADB8.3000700@ubuntu.com \
    --to=doko@ubuntu.com \
    --cc=classpath-patches@gnu.org \
    --cc=java-patches@gcc.gnu.org \
    --cc=mark@klomp.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).