From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ncvnf-0003dX-Hx for qemu-devel@nongnu.org; Thu, 04 Feb 2010 02:06:51 -0500 Received: from [199.232.76.173] (port=37069 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ncvnd-0003cR-KA for qemu-devel@nongnu.org; Thu, 04 Feb 2010 02:06:49 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Ncvnb-0000iV-UW for qemu-devel@nongnu.org; Thu, 04 Feb 2010 02:06:49 -0500 Received: from mga05.intel.com ([192.55.52.89]:5012 helo=fmsmga101.fm.intel.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ncvnb-0000hB-JY for qemu-devel@nongnu.org; Thu, 04 Feb 2010 02:06:47 -0500 From: Sheng Yang Date: Thu, 4 Feb 2010 15:04:52 +0800 MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <201002041504.52626.sheng@linux.intel.com> Subject: [Qemu-devel] "Enable _FORTIFY_SOURCE=2" result in building failure for qemu-img.c List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: "Kirill A. Shutemov" , Anthony Liguori , Juan Quintela Got this building failure: In file included from qemu-img.c:68: = = =20 qemu-img-cmds.h:22:1: error: unterminated argument list invoking macro=20 "printf" = =20 cc1: warnings being treated as errors qemu-img.c: In function =E2=80=98help=E2=80=99: qemu-img.c:95: warning: statement with no effect qemu-img.c:71: error: expected =E2=80=98;=E2=80=99 before string constant qemu-img.c:95: error: expected statement before =E2=80=98)=E2=80=99 token make: *** [qemu-img.o] Error 1 And git bisect figure out the commit: 84958305, "Enable _FORTIFY_SOURCE=3D2= ". And the code is here: printf("qemu-img version " QEMU_VERSION ", Copyright (c) 2004-2008 Fabr= ice=20 Bellard\n" "usage: qemu-img command [command options]\n" "QEMU disk image utility\n" "\n" "Command syntax:\n" #define DEF(option, callback, arg_string) \ " " arg_string "\n" #include "qemu-img-cmds.h" #undef DEF #undef GEN_DOCS =2E... Seems gcc take "printf" as a marco. I added a "#undef printf" before the li= ne,=20 then it works... So any clue on what's happened and how to fix? GCC version is 4.1.2. =2D-=20 regards Yang, Sheng