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

Solaris Studio 12.4 C++ 5.13 change in behavior for placing friend declarations within surrounding scope

    Details

    • Subcomponent:
    • Resolved In Build:
      b14

      Backports

        Description

        From: http://docs.oracle.com/cd/E37069_01/html/E37075/gnyjb.html#OSSCPgnyly

        "When a friend declaration in class C for a function or class T was the first declaration of T, previous compilers incorrectly inserted the declaration of T into the surrounding scope. The Oracle Solaris Studio 12.4 C++ 5.13 compiler no longer does so, because it can lead to incorrect interpretation of valid programs."

        An example of this change in behavior for Hotspot first shows up as an C++ error diagnostic in src/share/vm/adlc/filebuff.hpp

        "<directory>/src/share/vm/adlc/filebuff.hpp", line 107: Error: Unqualified name '<<' in friend declaration is looked up in the nearest enclosing namespace and does not refer to existing '::std::operator<<<_charT, _Traits>(basic_ostream<_charT, _Traits>&, _charT)'.
        1 Error(s) detected.

        All friend declarations will have to be examined and potentially changed before using Solaris C++ 5.13.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  lfoltan Lois Foltan
                  Reporter:
                  lfoltan Lois Foltan
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: