Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8168471

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b142
    • OS:
      windows

      Description

      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 :(

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: