title: How -fvisibility-inlines-hidden differs from -fvisibility=hidden in gcc
body: <p>According to <a href="http://gcc.gnu.org/wiki/Visibility" rel="noreferrer">http://gcc.gnu.org/wiki/Visibility</a>,  </p>
  
  <blockquote>
    <p>With <code>-fvisibility=hidden</code>, you are telling GCC that every declaration not explicitly marked with a visibility attribute has a hidden visibility.</p>
  </blockquote>
  
  <p>And</p>
  
  <blockquote>
    <p><code>-fvisibility-inlines-hidden</code> causes all inlined class member functions to have hidden visibility</p>
  </blockquote>
  
  <p>When I compile a very large project, it seems to me that adding <code>-fvisibility-inlines-hidden</code> together with <code>-fvisibility=hidden</code> can indeed hide more symbols compared to using <code>-fvisibility=hidden</code> along. But I cannot find a minimum example that shows the exact difference where <code>-fvisibility-inlines-hidden</code> take effects. I also tried <a href="https://stackoverflow.com/questions/14596672/why-constructor-still-be-exported-when-i-using-fvisibility-hidden/14618615#comment105118214_14618615">this</a> example but failed to see the effects of latter.</p>
  
  <p>Can someone show me a minimum example showing that <code>-fvisibility-inlines-hidden</code> are still necessary if I'm already using <code>-fvisibility=hidden</code> ? I'm using GCC 5.3.0</p>