This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

exception storage overhead


GCC version: 2.95.2

Why does the use of exceptions cause a trivial 11K program to jump to 
119K.  What could possibly be involved in the exception overhead that would 
require 109K of code?



         struct Foo {
                 void run(int j) {if (j<0) throw 1;}
         };

         int main(void) {
                 try {
                         Foo foo;
                         for(int i=0;i<=10000000;++i) {
                                 for(int j=0;j<=10;++j) {
                                         foo.run(j);
                                 }
                         }
                 }
                 catch (...) {return 1;}
                 return 0;
         }



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]