<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - availability attributes override visibility"
   href="https://bugs.llvm.org/show_bug.cgi?id=33796">33796</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>availability attributes override visibility
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>C++
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>nicolasweber@gmx.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>We're moving Chrome to @available, which requires tagging some of our code with
API_AVAILABLE(10.10). However, that seems to also make classes visible, which
we don't want:

$ cat test.cc
#define F
class F Foo {
  void f();
};

void Foo::f() {}
$ bin/clang -c test.cc -mmacosx-version-min=10.10 -fvisibility=hidden
-fvisibility-inlines-hidden && ld -dylib -o libtest.dylib test.o && nm
libtest.dylib 
ld: warning: -macosx_version_min not specified, assuming 10.10
0000000000000fb0 t __ZN3Foo1fEv

$ cat test.cc
#define F __attribute__((availability(macos, introduced=10.11))) 
class F Foo {
  void f();
};

void Foo::f() {}
$ bin/clang -c test.cc -mmacosx-version-min=10.10 -fvisibility=hidden
-fvisibility-inlines-hidden && ld -dylib -o libtest.dylib test.o && nm
libtest.dylib 
ld: warning: -macosx_version_min not specified, assuming 10.10
0000000000000fb0 T __ZN3Foo1fEv



That's hopefully just a bug, and not by design?</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>