X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=libstdc%2B%2B-v3%2Fdoc%2Fhtml%2Fmanual%2Fusing_exceptions.html;h=dc8c4daec8bb6ce62c7f5bd278096bb97b1edaff;hb=2f6b595fe7fda455237aa64c35d8e8f5c5c7f4d4;hp=39fc1e05cfd45238b669d4ad9bbc9eeb3f81fe08;hpb=4aced1a1e0a85d16a1b900a2cccaee5b22c3876f;p=pf3gnuchains%2Fgcc-fork.git diff --git a/libstdc++-v3/doc/html/manual/using_exceptions.html b/libstdc++-v3/doc/html/manual/using_exceptions.html index 39fc1e05cfd..dc8c4daec8b 100644 --- a/libstdc++-v3/doc/html/manual/using_exceptions.html +++ b/libstdc++-v3/doc/html/manual/using_exceptions.html @@ -8,12 +8,12 @@ the throw keyword. These are very powerful constructs, and require some thought when applied to the standard library in order to yield components that work efficiently while cleaning up resources when unexpectedly killed via -exceptional circumstances. +exceptional circumstances.

Two general topics of discussion follow: exception neutrality and exception safety. -

Exception Safety

- What is exception-safe code? +

Exception Safety

+ What is exception-safe code?

Will define this as reasonable and well-defined behavior by classes and functions from the standard library when used by user-defined @@ -124,7 +124,7 @@ exception neutrality and exception safety. use -fno-exceptions. If you have some code that uses try or catch, you shouldn't use -fno-exceptions. -

+

And what it to be gained, tinkering in the back alleys with a language like this? Exception handling overhead can be measured in the size of the executable binary, and varies with the @@ -194,7 +194,7 @@ exception neutrality and exception safety. library has been transformed, user code may need modification. User code that attempts or expects to do error checking on standard library components compiled with exception handling disabled should - be evaluated and potentially made conditional. + be evaluated and potentially made conditional.

Some issues remain with this approach (see bugzilla entry 25191). Code paths are not equivalent, in @@ -220,7 +220,7 @@ exception neutrality and exception safety. substitution of the C language keyword const with the uglified doppelganger __const. -

Compatibility

With C

+

Compatibility

With C

C language code that is expecting to interoperate with C++ should be compiled with -fexceptions. This will make debugging a C language function called as part of C++-induced stack @@ -235,7 +235,7 @@ is called. getting these details right. For GNU systems, all appropriate parts of the GNU C library are already compiled with -fexceptions. -

With POSIX thread cancellation

+

With POSIX thread cancellation

GNU systems re-use some of the exception handling mechanisms to track control flow for POSIX thread cancellation.

@@ -266,54 +266,63 @@ is called. } catch(...) { this->_M_setstate(ios_base::badbit); } -

Bibliography

- System Interface Definitions, Issue 7 (IEEE Std. 1003.1-2008) - . +

Bibliography

+ + + System Interface Definitions, Issue 7 (IEEE Std. 1003.1-2008) + + + . 2.9.5 Thread Cancellation . Copyright © 2008 - The Open Group/The Institute of Electrical and Electronics Engineers, Inc.. - - - .

- Error and Exception Handling - . David Abrahams . - Boost - . + The Open Group/The Institute of Electrical and Electronics + Engineers, Inc. + .

- Exception-Safety in Generic Components - . David Abrahams. + . David Abrahams . Boost - . + .

- Standard Library Exception Policy - . Matt Austern. - WG21 N1077 - . + . David Abrahams. + Boost + .

- ia64 c++ abi exception handling - . Richard Henderson. - GNU - . + . Matt Austern. + WG21 N1077 + .

- Appendix E: Standard-Library Exception Safety - . Bjarne Stroustrup. + . Richard Henderson. + GNU + .

+ . Bjarne Stroustrup.

Exceptional C++ . Exception-Safety Issues and Techniques - . Herb Sutter.

- exception_defines.h #defines try/catch - . - GCC Bug 25191 - . + . Herb Sutter.