public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-8263] More precise documentation for cleanup attribute [PR110029]
@ 2024-01-19 2:10 Sandra Loosemore
0 siblings, 0 replies; only message in thread
From: Sandra Loosemore @ 2024-01-19 2:10 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:ed28a835058d2e72036f4adb1dd60edf735c7d00
commit r14-8263-ged28a835058d2e72036f4adb1dd60edf735c7d00
Author: Sandra Loosemore <sandra@codesourcery.com>
Date: Fri Jan 19 02:06:55 2024 +0000
More precise documentation for cleanup attribute [PR110029]
gcc/ChangeLog
PR c/110029
* doc/extend.texi (Common Variable Attributes): Explain what
happens when multiple variables with cleanups are in the same scope.
Diff:
---
gcc/doc/extend.texi | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 616e26d47dc..0bc586d120e 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -7782,6 +7782,11 @@ with static storage duration. The function must take one parameter,
a pointer to a type compatible with the variable. The return value
of the function (if any) is ignored.
+When multiple variables in the same scope have @code{cleanup}
+attributes, at exit from the scope their associated cleanup functions
+are run in reverse order of definition (last defined, first
+cleanup).
+
If @option{-fexceptions} is enabled, then @var{cleanup_function}
is run during the stack unwinding that happens during the
processing of the exception. Note that the @code{cleanup} attribute
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-19 2:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-19 2:10 [gcc r14-8263] More precise documentation for cleanup attribute [PR110029] Sandra Loosemore
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).