From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Ronald G. Minnich" To: 9fans@cse.psu.edu Subject: Re: [9fans] how to avoid a memset() optimization In-Reply-To: <29597830.1037174088@WAAKZAAMHEID> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Date: Wed, 13 Nov 2002 09:32:44 -0700 Topicbox-Message-UUID: 1cddc2d8-eacb-11e9-9e20-41e7f4b1d025 On Wed, 13 Nov 2002, rob pike wrote: > The problem is of course that only curmudgeons like me feel the need; > everyone else wants the rat's nest, which is why we got it in the first > place. I feel the need. Linuxbios no longer works on gcc 3.2 because of some bizarre optimisations that have gone in that break mptable parsing. One person claims that you can no longer count on this: struct x { int a; int b; }; resulting in code in which a and b are laid out in memory in the same order as in the structure (this due to C++). Structure members can get reordered. I can't believe this is true, but someone claims it is and I have not had time to verify it. People actually ask me, from time to time, why I care that structure members get laid out as you declare them. !@#$!@#$#@!. Then they say something like "you should use a systems programing language if you need that". !@!@#$#!@$#!$#@. Yep, we need a C that works for its original purpose. ron