Article View: comp.lang.c
Article #1263C: a question about scope automatics in C
From: Ross Finlayson
Date: Mon, 02 Nov 2026 18:38
Date: Mon, 02 Nov 2026 18:38
20 lines
2180 bytes
2180 bytes
C: a question about scope automatics in C Hello, I hope someone can tell me whether C may make for scope automatics any account of attaching side-effects to block-declared variables about scope-exit of automatics making for any way in C to attach behavior to scope-exit, or any way to make for when a variable goes out of scope (block-scope, or, function-scope) to make any account of cleanup of it. C++ of course has that's the usual way of things with stack-allocation and block-scope for automatics, I'm wondering if there's any way C makes it so (I think not, yet would be glad to know so). If not, are there common compiler extensions to so indicate when a variable goes out of scope and make effects on it? Thanks for reading, also I'd be interested your opinion.
Technical Details
Message-ID:
<oOScndMmgZhYRXX3nZ2dnZfqnPGdnZ2d@giganews.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.nrbbs.org!border-3.nntp.ord.giganews.com!nntp.giganews.com!local-3.nntp.ord.giganews.com!Xl.tags.giganews.com!local-4.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.nrbbs.org!border-3.nntp.ord.giganews.com!nntp.giganews.com!local-3.nntp.ord.giganews.com!Xl.tags.giganews.com!local-4.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Mon, 02 Nov 2026 18:39:01 +0000 Newsgroups: comp.lang.c X-Mozilla-News-Host: snews://giganews.com:443 From: Ross Finlayson <ross.a.finlayson@gmail.com> Subject: C: a question about scope automatics in C Date: Mon, 2 Nov 2026 10:38:44 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <oOScndMmgZhYRXX3nZ2dnZfqnPGdnZ2d@giganews.com> Lines: 20 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-jIAHHj0wFCc8sP/Yq6DCjZTh0mZzFGnqqasBDftn+fbmAILHeSKgOK3n33+3DZYZwVq8FFVoojy6Ck7!8Wd+je2krtodrwXPi5dM7tJFd2m28aU8XCeElJfLyi1Htz2kbDi48u4Kx4aSpFsx6E14sfl+4xM= X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40