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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 9
    • 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 :(

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

              Created:
              Updated:
              Resolved: