Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Paul Rubin Newsgroups: comp.lang.forth Subject: Re: rhel 7 and kforth Date: Thu, 16 Apr 2015 20:27:15 -0700 Organization: A noiseless patient Spider Lines: 13 Message-ID: <87pp73wi24.fsf@jester.gateway.pace.com> References: <6b95db78-ff4c-42aa-9680-7e4e588f61a4@googlegroups.com> <29c7eb53-229e-40a4-9bad-0d14e953ebc3@googlegroups.com> <87f18d43-a91e-4ae7-b98a-2cf4b7227c47@googlegroups.com> <87y4lrwpfo.fsf@jester.gateway.pace.com> <87twwfwlm2.fsf@jester.gateway.pace.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="bda44be170c76b3ef6d23fecd204a8fa"; logging-data="1677"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19ISQ5UwSnrK0QbNmeKE9Jv" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:RrgNxwDqzxNbUnLV3/pJYDKJNWk= sha1:FGg48unFIgQ+r8Yh51se1o77fUU= Xref: csiph.com comp.lang.forth:38250 krishna.myneni@ccreweb.org writes: > Interestingly, gcc 4.9 does not complain at all about a statement like > a[i] = i++; > It compiles and executes without problem, per the example below. The statement has undefined semantics, which means the compiler can do whatever it wants, including doing what you expected it to do, as it did there. It's just not -required- to do what you expected, and the behavior can change from one compiler or compilation to another. This is one of the reasons C sucks so bad. If you compile with -Wall you should get a warning message about that operation.