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

Hotspot(1.4.2) should follow ISO C{89,99} and C++98

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Duplicate
    • P4
    • None
    • 6
    • vm-legacy
    • itanium
    • linux_redhat_3.0

    Description

      A licensee find out the hotspot source code does not follow ISO.

      They tried to build JDK source code(1.4.2_05) in RedHat Enterprise Linux 4.0(64bits)
      with gcc/g++ 3.4.2 and 3.4.1, there occurred some compile errors.

      According to licensee's investigation, errors occurs in the lines which includes
      "##" in pre-processing.
      Specifically speaking, for example, methodName##signature in the following "(*)HERE" line.

      ---- src/share/vm/runtime/jvmdiInterfaceSupport.hpp ---
      ....
      #define __JVMDI_ENTER(TransitionClass, trace, result_type, methodName, signature) \
      extern "C" { \
        result_type JNICALL methodName signature { \
          JavaThread* thread = (JavaThread*) ThreadLocalStorage::thread(); \
          TransitionClass __tiv(thread); \
          __ENTRY(result_type, methodName##signature, thread) \ <==(*) HERE
          debug_only(VMNativeEntryWrapper __vew;) \
          debug_only(const char* const _jvmdi_methodName_ = #methodName;) \
          debug_only(bool _trace_ = trace; ); \
          debug_only(if (TraceJVMDICalls && _trace_) { JvmdiTraceWrapper _ignore(#methodName); });

      #define JVMDI_ENTER(result_type, methodName, signature) \
        __JVMDI_ENTER(ThreadInVMfromNative, true, result_type, methodName, signature)

      ...
      ---

      For details, please see the comment section.

      ###@###.### 2004-11-10 08:26:20 GMT

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tbaba Tadayuki Baba (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: