From mboxrd@z Thu Jan 1 00:00:00 1970 References: <4F144B53.6070906@gmail.com> In-Reply-To: <4F144B53.6070906@gmail.com> Mime-Version: 1.0 (1.0) Content-Type: text/plain; charset=us-ascii Message-Id: <72D563DD-2603-424D-9946-569D7AE34A15@bitblocks.com> Content-Transfer-Encoding: quoted-printable From: Bakul Shah Date: Mon, 16 Jan 2012 08:54:09 -0800 To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Subject: Re: [9fans] assembly syntax in plan 9 Topicbox-Message-UUID: 5d41a0fe-ead7-11e9-9d60-3106f5b1d025 On Jan 16, 2012, at 8:07 AM, "Joel C. Salomon" wrot= e: > This would make it difficult to implement C99's variable-length > (actually, run-time-determined--length) arrays. The best compiler-only > change I can think of would be to define a hidden variable `size_t > __size_of_all_vlas`, and add code to adjust SP by that amount before & > after each function call. Length can be derived from user input, or diff. arrays can be allocated in d= iff. branches of switch or if stmt. so your trick won't always work. > Google turns up , > indicating that GCC had issues combining VLAs and -fomit-frame-pointer; > I don't know how they managed the combination. Must use a frame pointer in any function that has VLAs and must save it befo= re calling another function from it.=20=