title: Using __attribute__ with typedef
body: <p>Apologies if the question seems too obvious or simple. Unfortunately, after going through a bunch of threads and googling about typedef coupled with <strong>attribute</strong> prefix, I am still not able to it figure out.</p>
  
  <p>I have a following snippet of code in a (supposedly) portable app - </p>
  
  <pre><code>#ifdef WIN32
  #define MY_PREFIX __declspec(dllexport)
  #else
  #define MY_PREFIX __attribute__((visibility("default")))
  #endif
  
  typedef MY_PREFIX bool some_func(void);
  </code></pre>
  
  <p>So my question is this - <br>
  1) What is that typedef exactly doing? <br>
  2) The code compiles fine on VS2008, but on G++ (gcc-4.1), I get a warning 
     "‘visibility’ attribute ignored" <br>
     Is there any way I can remove that warning? (Omitting -Wattributes is not an option) <br></p>
  
  <p>Thanks! </p>