home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.compilers      Compiler construction, theory, etc. (Mod      2,753 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 1,503 of 2,753   
   Barry Kelly to Marco van de Voort   
   Re: compiling C++ to C, was writing a co   
   05 Nov 08 07:46:04   
   
   From: barry.j.kelly@gmail.com   
      
   Marco van de Voort wrote:   
      
   > On 2008-11-03, Alex Colvin  wrote:   
      
   > > Runtime and linker features such as exceptions and template instantiation   
   > > would be very difficult to generate in C.   
      
   > Exceptions are harder. Sure, it is doable in C, but would the resulting,   
   > stack unwinding C be portable to a different compiler (IOW free of (ab)use of   
   > specific ABI knowledge )?   
      
   I've implemented Windows SEH-style exception handling (try / except /   
   finally) using C setjmp and longjmp, and I'm sure I'm not alone. C++ EH   
   can be built on top of that.   
      
   It's not particularly pretty, but it's portable in so far as setjmp and   
   longjmp are portable, if you e.g. discard register attributes for locals   
   etc.   
      
   -- Barry   
      
   --   
   http://barrkel.blogspot.com/   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca