C++: Difference between revisions

1,124 bytes removed ,  12 years ago
[unchecked revision][unchecked revision]
m (interwiki)
Line 478:
Another feature that requires run-time support. Disable it with '''-fno-exceptions'''. Exceptions require code to unwind the stack while looking for an appropriate exception handler to handle the exception. Usually, this code is linked in with your C++ application, but in a freestanding kernel the code must be provided manually.
 
See [[C++ Exception Support]].
The wiki doesn't have too much information about implementing exceptions at this time. You can however view the links below for more information.
 
* http://www.codesourcery.com/cxx-abi/abi-eh.html (sounds like being Itanium specific, but that's actually the base for the common C++ ABI)
* http://www.codeproject.com/cpp/exceptionhandler.asp (explaining the stuff, but for VC++. Note that, on x86, VC++ and most other PC compilers use a [[Stack#Unwinding the stack|stack-based unwinding]] and handling mechanism known as SEH, common to OS/2, Windows and Windows NT and described in detail in a famous MSJ article, http://www.microsoft.com/msj/0197/Exception/Exception.aspx. GCC and most other UNIX compilers, instead, use the same table-based mechanism that is the rule on RISC architectures on x86 too. Also note that any use of stack-based SEH may or may not be covered by USPTO patent #5,628,016, held by Borland International, Inc. SEH on RISC architectures is table-based, thus unaffected by the patent)
* http://www.kuzbass.ru:8086/docs/isocpp/except.html
 
Note that there is a standard header '''<exception>''', declaring several support functions.
 
== Standard Template Library ==
448

edits