title: Can I disable exceptions for when a pure virtual function is called?
body: <p>I have some code that looks like this:</p>
  
  <pre><code>class Writable {
  public:
      virtual void putc(const char ch) = 0;
  protected:
      virtual ~Writable() {};
  };
  
  class Readable {
  public:
      virtual char getc() = 0;
  protected:
      virtual ~Readable() {};
  };
  </code></pre>
  
  <p>Notice the two virtual functions. Compiling this (along with my other code) using <code>arm-none-eabi-gcc</code>, and linking with <code>-fno-exceptions</code> produces this output:</p>
  
  <pre><code>arm-none-eabi-size  --format=berkeley bareCortexM.elf
     text    data     bss     dec     hex filename
   108948    2304    2372  113624   1bbd8 bareCortexM.elf
  </code></pre>
  
  <p>Running it again with method stubs in place of pure virtual functions yields:</p>
  
  <pre><code>arm-none-eabi-size  --format=berkeley bareCortexM.elf
     text    data     bss     dec     hex filename
    47340    2296     304   49940    c314 bareCortexM.elf
  </code></pre>
  
  <p>This huge difference seems to be due to exceptions. Is there any way that I can prevent this from happening?</p>