From owner-freebsd-current@FreeBSD.ORG Thu Dec 20 13:01:49 2007 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EDF9016A474 for ; Thu, 20 Dec 2007 13:01:48 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.236]) by mx1.freebsd.org (Postfix) with ESMTP id AA96213C474 for ; Thu, 20 Dec 2007 13:01:48 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: by nz-out-0506.google.com with SMTP id l8so1623015nzf.13 for ; Thu, 20 Dec 2007 05:01:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:cc:subject:message-id:in-reply-to:references:x-mailer:mime-version:content-type; bh=65KIQ9LrEAiE/rN9cMB6tVyyLDVTgon98btASywe4ew=; b=RK6jbxUcATFQVafbpIVWBrbdGMTTtn5CAsTcPRugNHh+56/lcU7XIr8CKp9+Lm8hUc55TKUfzbVkq81QRi+shU5XrhuG6kETw3uLIF22kiJtiGqGmmTdYkbhExLmlSatxJA4/YtajzwZvSbvDRCA/vjjt1IpeRWehWZgxXowZFk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:cc:subject:message-id:in-reply-to:references:x-mailer:mime-version:content-type; b=B6y4lqVQbcdOzB7DmV7pWUxO1sAJxXWQHO8/ZWblFJ+QQUk+D4kWyiElZIb6mtHuL4y8wIEUt47srsbHAWgtU2v2a4Y9O+kyJ8W5XRnuI1gXDRY/kTnC+UkxiD1jkm8E9j+1ej2SYZlKupfrhTi7qgO33TzZvsLHq9mqt+4msxU= Received: by 10.142.111.14 with SMTP id j14mr1503326wfc.96.1198155707030; Thu, 20 Dec 2007 05:01:47 -0800 (PST) Received: from kan.dnsalias.net ( [24.218.183.247]) by mx.google.com with ESMTPS id 35sm21288238wra.2007.12.20.05.01.41 (version=SSLv3 cipher=OTHER); Thu, 20 Dec 2007 05:01:41 -0800 (PST) Date: Thu, 20 Dec 2007 08:01:27 -0500 From: Alexander Kabaev Message-ID: <20071220080127.2e0a5a1b@kan.dnsalias.net> In-Reply-To: <200712191949.43414.mi+mill@aldan.algebra.com> References: <200712191949.43414.mi+mill@aldan.algebra.com> X-Mailer: Claws Mail 3.0.2 (GTK+ 2.12.1; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/Wbn=UgdrFY4H/Pd82MAXMBw"; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: current@freebsd.org Subject: Re: WARNS=3 and C++ on 8.x X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Dec 2007 13:01:49 -0000 --Sig_/Wbn=UgdrFY4H/Pd82MAXMBw Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed, 19 Dec 2007 19:49:43 -0500 Mikhail Teterin wrote: > Hello! >=20 > The graphics/libfpx port can not currently be built on 8.x, because > the WARNS=3D3, which is set in files/Makefile.bsd triggers > -Wsystem-headers. >=20 > That setting triggers the following warning: >=20 > In file included from /usr/include/c++/4.2/ios:50, > from /usr/include/c++/4.2/ostream:45, > from /usr/include/c++/4.2/iostream:45, > from /work/a/ports/graphics/libfpx/work/libfpx-1.2.0.12/= ole/olestorg.cpp:20: > /usr/include/c++/4.2/bits/basic_ios.h: In member function 'void > std::basic_ios<_CharT, > _Traits>::_M_setstate(std::_Ios_Iostate)': /usr/include/c++/4.2/bits/basi= c_ios.h:156: > warning: empty body in an if-statement >=20 > The port builds fine on 7.x and 6.x. Could the 8.x, please, be fixed? > I mean, the setting, pretty much, assures, that ALL C++ software can't > be built (with WARNS=3D3, that is), because almost everything uses > iostream. >=20 > Thanks! >=20 > -mi The code below is from /usr/include/c++/4.2/exception_defines.h and as you can see, WARNS3 alone is not enough, -fno-exceptions has to be on the command line too, something you forgot to mention. There's nothing to fix in FreeBSD itself, the change should go into vendor sources.=20 #ifndef __EXCEPTIONS // Iff -fno-exceptions, transform error handling code to work without it. # define try if (true) # define catch(X) if (false) # define __throw_exception_again #else // Else proceed normally. # define __throw_exception_again throw #endif --=20 Alexander Kabaev --Sig_/Wbn=UgdrFY4H/Pd82MAXMBw Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFHamenQ6z1jMm+XZYRAsHTAJ9+34WGI/UGj0KudJLYcEbPkC8H5wCfVhW1 dCy4RYKBevLsVbrLYw1BSPg= =gtR2 -----END PGP SIGNATURE----- --Sig_/Wbn=UgdrFY4H/Pd82MAXMBw--