From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Gc0te-0001Lv-AD for qemu-devel@nongnu.org; Mon, 23 Oct 2006 10:35:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Gc0tb-0001Iw-Sn for qemu-devel@nongnu.org; Mon, 23 Oct 2006 10:35:21 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gc0tb-0001Ib-J2 for qemu-devel@nongnu.org; Mon, 23 Oct 2006 10:35:19 -0400 Received: from [64.78.21.128] (helo=mis011-1.exch011.intermedia.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Gc0tb-0001za-BB for qemu-devel@nongnu.org; Mon, 23 Oct 2006 10:35:19 -0400 Message-ID: <453CD322.8090303@qumranet.com> Date: Mon, 23 Oct 2006 16:35:14 +0200 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] qemu vs gcc4 References: <45391B22.1050608@palmsource.com> <200610231510.47140.paul@codesourcery.com> <453CD1A3.2060206@qumranet.com> <200610231531.51496.paul@codesourcery.com> In-Reply-To: <200610231531.51496.paul@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: qemu-devel@nongnu.org Paul Brook wrote: >>> We already do that. It doesn't stop gcc putting the return in the middle >>> of the function. >>> >>> Paul >>> >> void f1(); >> void f2(); >> >> void f(int *z, int x, int y) >> { >> if (x) { >> *z = x; >> f1(); >> } else { >> *z = y; >> f2(); >> } >> asm volatile (""); >> } >> >> works, with gcc -O2 -fno-reorder-blocks. removing either the asm or the >> -f flag doesn't. No idea if it's consistent across architectures. >> > > It doesn't work reliably though. We already do everything you mention above. > Okay. Sorry for pestering :) -- error compiling committee.c: too many arguments to function