Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.lang.c Subject: Re: Memory protection between compilation units? Date: Fri, 13 Jun 2025 15:48:37 -0700 Organization: A noiseless patient Spider Lines: 22 Message-ID: <86sek3p8ai.fsf@linuxsc.com> References: <20250611153239.6bc43323@mateusz> <86wm9hp0u2.fsf@linuxsc.com> <102geup$38k6o$2@raubtier-asyl.eternal-september.org> <92d8fbd8b5ae741ee915fdf4d95e5a374108f37f.camel@gmail.com> <87v7ozh1yq.fsf@nosuchdomain.example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Sat, 14 Jun 2025 00:48:41 +0200 (CEST) Injection-Info: dont-email.me; posting-host="a9edd55b5a0bee1215b4bf0a80e1da53"; logging-data="3920350"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19hZLdnTP82PtvrZSvoWKp0ahJH0k7NeK4=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:+AxBA70ywWPeodUY0FFyZjfOPmw= sha1:MpCtlTv9XMo1wzF0xcBDGiikHMI= Keith Thompson writes: > wij writes: > >> On Fri, 2025-06-13 at 08:03 +0200, Bonita Montero wrote: >> >>> Am 12.06.2025 um 15:05 schrieb Tim Rentsch: >>> >>>> void update_my_socks(int *sock, int val) { >>>> const unsigned N = sizeof socks / sizeof socks[0]; >>>> socks[val % N] = sock; >>>> } >>> >>> For someone who uses bounds-checked containers in C++ every day >>> this really looks achaic. >> >> Really? What are they? > > Feel free to discuss that in comp.lang.c++. As a point of information, I have given up reading posts from Bonita Montero.