Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: wij Newsgroups: comp.lang.c Subject: Re: Memory protection between compilation units? Date: Sat, 14 Jun 2025 02:16:59 +0800 Organization: A noiseless patient Spider Lines: 14 Message-ID: <92d8fbd8b5ae741ee915fdf4d95e5a374108f37f.camel@gmail.com> References: <20250611153239.6bc43323@mateusz> <86wm9hp0u2.fsf@linuxsc.com> <102geup$38k6o$2@raubtier-asyl.eternal-september.org> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Date: Fri, 13 Jun 2025 20:17:00 +0200 (CEST) Injection-Info: dont-email.me; posting-host="304a1c71a32d3a5da8476aa61a8030f7"; logging-data="3749742"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Tm28dJVsJCGupvTHvLkcy" User-Agent: Evolution 3.56.2 (3.56.2-1.fc42) Cancel-Lock: sha1:zW6TD739dL559s3dyaqWZtr5K9U= In-Reply-To: <102geup$38k6o$2@raubtier-asyl.eternal-september.org> On Fri, 2025-06-13 at 08:03 +0200, Bonita Montero wrote: > Am 12.06.2025 um 15:05 schrieb Tim Rentsch: >=20 > > =C2=A0=C2=A0=C2=A0 void update_my_socks(int *sock, int val) { > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 const unsigned N =3D sizeof socks = / sizeof socks[0]; > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 socks[val % N] =3D sock; > > =C2=A0=C2=A0=C2=A0 } >=20 > For someone who uses bounds-checked containers in C++ every day > this really looks achaic. Really? What are they?