From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17109 invoked by alias); 6 Jan 2013 17:00:59 -0000 Received: (qmail 17092 invoked by uid 22791); 6 Jan 2013 17:00:55 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,TW_GJ X-Spam-Check-By: sourceware.org Received: from youngberry.canonical.com (HELO youngberry.canonical.com) (91.189.89.112) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 06 Jan 2013 17:00:49 +0000 Received: from dslb-088-073-100-213.pools.arcor-ip.net ([88.73.100.213] helo=[192.168.42.216]) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1TrtaX-0005yH-Ef; Sun, 06 Jan 2013 17:00:45 +0000 Message-ID: <50E9ADB8.3000700@ubuntu.com> Date: Sun, 06 Jan 2013 17:00:00 -0000 From: Matthias Klose User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Mark Wielaard CC: classpath-patches@gnu.org, GCJ-patches Subject: Re: [cp-patches] [patch] let gjavah accept -source 1.[567] References: <50D1BA96.8000600@ubuntu.com> <20121219173749.GA22367@toonder.wildebeest.org> In-Reply-To: <20121219173749.GA22367@toonder.wildebeest.org> Content-Type: multipart/mixed; boundary="------------000504090604030005030308" X-IsSubscribed: yes Mailing-List: contact java-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-patches-owner@gcc.gnu.org X-SW-Source: 2013-q1/txt/msg00000.txt.bz2 This is a multi-part message in MIME format. --------------000504090604030005030308 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-length: 1666 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. --------------000504090604030005030308 Content-Type: text/x-diff; name="libjava-gjdoc.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="libjava-gjdoc.diff" Content-length: 1215 # 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."); } } }); --------------000504090604030005030308--