Non ANSI C declaration of block local variable in NetworkInterface_winXP.c

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 9
    • Affects Version/s: 9
    • Component/s: core-libs
    • b142
    • windows

      Change "8168405: Pending exceptions in java.base/windows/native" introduced the following non ANSI C compatible code for declaring a block-level variable ("jboolean ret"):

              } else /* AF_INET6 */ {
                  int scope;
                  iaObj = (*env)->NewObject(env, ia6_class, ia6_ctrID);
                  if (iaObj == NULL) {
                      return NULL;
                  }
                  jboolean ret = setInet6Address_ipaddress(env, iaObj, (jbyte *)&(addrs->addr.sa6.sin6_addr.s6_addr));

      But ANSI C only allows the declaration of block local variable at the beginning of a block.Unfortunately some still very common compiler like VS2010 and VS2012 still don't support this C99 feature :(

            Assignee:
            Volker Simonis
            Reporter:
            Volker Simonis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: