title: c++ exception specification in a function pointer
body: <p><b>Code: </b><br/></p>
  
  <pre><code>#include&lt;iostream&gt;
  using namespace std;
  
  void foo() throw(char) {throw 'a';}
  
  int main() try {
  
     void (*pf)() throw(float);
     pf = foo; // This should NOT work 
     pf();
  
  }
  catch(const char&amp; c){cout &lt;&lt; "Catched ::&gt; " &lt;&lt; c &lt;&lt; endl;}
  </code></pre>
  
  <p>Why it is possible to pass <code>foo</code> to <code>pf</code> even though the <code>foo</code> exception specification is different from what the function pointer <code>pf</code> has ? Is this a bug in my compiler?</p>