On Thu, Jul 21, 2016 at 7:49 AM, David Holmes <[email protected]> wrote: > Hi Volker, > > On 21/07/2016 4:49 AM, Volker Simonis wrote: >> >> Hi, >> >> can somebody please review the following trivial fix: >> >> http://cr.openjdk.java.net/~simonis/webrevs/2016/8161951/ >> https://bugs.openjdk.java.net/browse/JDK-8161951 >> >> Change '8132379: -J options can cause crash or "Warning: app args >> parsing error passing arguments as-is"' uses the following non ANSI C >> compatible code for declaring a block-level variable: >> >> for (i = 0; i < argc; i++) { >> j = appArgIdx[i]; >> jboolean arg_expand = (JLI_StrCmp(stdargs[j].arg, strv[i]) == 0) >> ? stdargs[j].has_wildcard >> : JNI_FALSE; >> >> But ANSI C only allows the declaration of block local variable at the >> beginning of a block. >> >> As the fix is trivial, it makes no sense to restrict ourselves to >> compilers which support this C99 feature (e.g. > VS2012). > > > Ok - Reviewed. But you really can't expect OpenJDK 9 to keep supporting C89 > restrictions. We have people trying to get in C++11 constructs! :) >
Thanks David! And I agree, but unfortunately VS2010 and VS2012 are still quite common in the industry and although they have been released quite a while after C99 was published they still don' support this feature :( Regards, Volker > Cheers, > David > > >> Thank you and best regards, >> Volker >> >
