Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ku7N1-0002u1-FK for qemu-devel@nongnu.org; Sun, 26 Oct 2008 11:17:35 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ku7Mz-0002tg-N6 for qemu-devel@nongnu.org; Sun, 26 Oct 2008 11:17:34 -0400 Received: from [199.232.76.173] (port=40988 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ku7Mz-0002tZ-CJ for qemu-devel@nongnu.org; Sun, 26 Oct 2008 11:17:33 -0400 Received: from fmmailgate01.web.de ([217.72.192.221]:46629) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ku7My-0005zR-Va for qemu-devel@nongnu.org; Sun, 26 Oct 2008 11:17:33 -0400 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= In-Reply-To: <48EB0C15.4040507@sgi.com> Subject: Re: [Qemu-devel] [patch 1/2] machine struct - use C99 initializers References: <48EA0E22.4080302@sgi.com> <48EA28DC.40604@sgi.com> <48EB0C15.4040507@sgi.com> Message-Id: Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v929.2) Date: Sun, 26 Oct 2008 16:17:27 +0100 Sender: andreas.faerber@web.de Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jes Sorensen Cc: qemu-devel@nongnu.org Jes, Am 07.10.2008 um 09:13 schrieb Jes Sorensen: > Andreas F=E4rber wrote: >>> GCC is sufficiently C99 compliant to handle this style of =20 >>> initializers. >>> Maybe it's not C99 compliant enough for other stuff, but on this =20 >>> front >>> it does just fine. >> You're missing the point: GCC today is not necessarily GCC 4.3+ or =20= >> whatever has just been released these days and included in your =20 >> favorite Linux distro. Just like Sun continues to ship GCC 3.4.3 on =20= >> their latest OpenSolaris builds, the BeOS world and therefore its =20 >> successor(s) are stuck with GCC 2.95.3 due to C++ ABI breakage in =20 >> between major GCC versions. GCC 2 was originally released in '98 =20 >> iirc and hence not C99 compliant. I'd expect your IRIX to face a =20 >> similar issue, at EOL. > > Andreas, > > I have sympathy with the BeOS users, however C99 style (not I am not > arguing that we necessarily need to require a full C99 compliant > compiler), are very common today and trying to stick to an ancient and > by now, far obsolete compiler, like 2.95.3 simply means that BeOS =20 > little > by little will not be able to compile any recent applications. The =20 > BeOS > community can try and battle every codebase being modernized or it can > put the efforts into updating it's compiler suite. Yes I know it's > painful, but I am going to argue it will be a better spent effort than > trying to hold back reality. It's a bit like argueing that everybody > must use candle lighting and not electrical because there are still a > few people living in houses which doesn't have any electricity. > > One interim step could be for OSes like BeOS to switch to egcs or Red > Hat's old gcc-2.96 base. I believe both support C99 style struct > initializers while still sticking to the old C++ ABI. > > FWIW, please don't try and use my email address as an indication =20 > that I > care about IRIX. If you do so, you obviously don't know me. That OS =20= > has > been dead for years and it's proprietary. I am as much a BeOS user as you are an IRIX user. They're examples. As =20= another one, see the more recent Sun C99 stdbool.h and math issues =20 (gcc3). It used to compile fine, now without having even such a C99-or-=20= not discussion it is broken due to C99 stuff. Btw even recent GCCs =20 have an -ansi switch that some software deliberately uses, e.g. =20 freetype2 iirc, so that today's system headers need to be ANSI-=20 compliant, not C99. Which GCC version an OS like Haiku or Solaris or Mac OS X chooses to =20 use is not under my control, nor probably anyone else's here, and =20 porting gcc is not among my skills to date. Nor would I want to do =20 that for every OS someone wants to use QEMU on, fwiw. Personally, I am =20= hoping for Haiku to get some gcc4 fully up and running. > >> So while this argument for using C99 is flawed, there may be valid =20= >> reasons for QEMU to use more C99 constructs. But their pure =20 >> availability in the latest GCCs is not very convincing. > > Well given that QEMU doesn't contain any C++, another option would =20 > be to > say we require at least gcc3 for QEMU QEMU still does officially require gcc3. > and have BeOS users compile it > with gcc3. I don't see that affecting the issue with broken C++ ABIs. The issue with C++ ABI breakage is in the use of C++ system libraries, =20= like Michael does iiuc (Be API). I am not involved in that port myself =20= though, nor running QEMU on Haiku/BeOS, so cannot offer any more =20 details. All that people here have been telling you is that the latest and =20 greatest GCC on The OS shouldn't affect the choice of C99 features =20 used because some platforms cannot use them (fully). No one, certainly =20= not me, has been battling the use of gcc3+ or existing C99 features. Hope that clarifies things, Andreas