title: Why does GCC report a Floating Point Exception when I execute 1/0?
body: <p>Stroustrup says, in "The Design and Evolution of C++" (Addison Wesley, 1994), "low-level events, such as arithmetic overflows and divide by zero, are assumed to be handled by a dedicated lower-level mechanism rather than by exceptions. This enables C++ to match the behaviour of other languages when it comes to arithmetic. It also avoids the problems that occur on heavily pipelined architectures where events such as divide by zero are asynchronous."</p>
  
  <p>Q1: If it's not an exception, why does GCC report one as opposed to a lower-level error?</p>
  
  <p>Q2: Given I'm dividing integers, why is it reported as floating point ?</p>
  
  <p>Given I cannot catch it with catch(...), it is very misleading.  Obviously I can test and avoid the whole 'error', but my point is that it is very confusing for a beginner who thinks that it might be an exception (reasonable), tries to catch it , then finds out that it's NOT AN EXCEPTION , and wonders about the run-time exception reported.  </p>
  
  <p>My compiler is gcc version 4.2.1 (Apple Inc. build 5666) (dot 3)</p>
  
  <p>Some accurate clarification of the difference between CPU exceptions, FPU exceptions, Language exceptions and OS exceptions might resolve this.  </p>
  
  <p>Example Program:</p>
  
  <pre><code>int main(){
      int i=1/0;
      return i;
  }
  </code></pre>
  
  <p>Resulting Output:</p>
  
  <blockquote>
    <p>Floating point exception</p>
  </blockquote>