Path: csiph.com!news.swapon.de!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Paul Rubin Newsgroups: comp.lang.forth Subject: Re: Average swaps per word? Date: Sun, 13 Nov 2016 11:43:52 -0800 Organization: A noiseless patient Spider Lines: 8 Message-ID: <871syff9mv.fsf@nightsong.com> References: <5352ea02-4942-40bf-8c92-e5012aae1807@googlegroups.com> <2016Nov12.132348@mips.complang.tuwien.ac.at> <2016Nov13.155518@mips.complang.tuwien.ac.at> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="51d66e977b7e108c6e1152f9492d7635"; logging-data="13966"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/lWPvTZYXku3y9GCAyYRcL" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:UFyWYTLPCTjCKCWzKAhP9WdVTVY= sha1:OcEUt01UJyQ0h5ymAb0xC77M4lE= Xref: csiph.com comp.lang.forth:52591 albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) writes: >>and gcc therefore "optimized" the memset() away. And >>while the following read from that memory (due to a buffer overflow) > They should have checked what happens while optimising. Failing that > they shouldn't have optimised. The right way to do that in C is with a volatile cast. Maybe Forth could use something similar.