From owner-freebsd-current Thu Mar 13 10: 9:10 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0C08737B401; Thu, 13 Mar 2003 10:09:08 -0800 (PST) Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 375C543FA3; Thu, 13 Mar 2003 10:09:02 -0800 (PST) (envelope-from ru@whale.sunbay.crimea.ua) Received: from whale.sunbay.crimea.ua (ru@localhost [127.0.0.1]) by whale.sunbay.crimea.ua (8.12.8/8.12.8/Sunbay) with ESMTP id h2DI8sFZ048934 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 13 Mar 2003 20:08:56 +0200 (EET) (envelope-from ru@whale.sunbay.crimea.ua) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.12.8/8.12.8/Submit) id h2DI8sgF048929; Thu, 13 Mar 2003 20:08:54 +0200 (EET) (envelope-from ru) Date: Thu, 13 Mar 2003 20:08:54 +0200 From: Ruslan Ermilov To: Bruce Evans , "David O'Brien" Cc: current@FreeBSD.org Subject: Do we want to let cpp(1) hide warnings in system headers? Message-ID: <20030313180854.GB47492@sunbay.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LpQ9ahxlCli8rRTG" Content-Disposition: inline User-Agent: Mutt/1.5.3i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --LpQ9ahxlCli8rRTG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Sigh. It's been a while since I've fixed the "feature" of gcc(1) that makes it hide warnings in system headers (but visible with -nostdinc -I/usr/include). I've stumbled upon a problem today, wondering, why the hell cpp(1) wasn't complaining me about the redefines, and the answer was: GNU cpp(1) hides warnings in system headers by default. Rather than hack contrib/gcc sources, it can be fixed the official way, like this: %%% Index: bsd.sys.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/share/mk/bsd.sys.mk,v retrieving revision 1.11 diff -u -r1.11 bsd.sys.mk --- bsd.sys.mk 13 Nov 2002 13:49:29 -0000 1.11 +++ bsd.sys.mk 13 Mar 2003 15:24:56 -0000 @@ -9,6 +9,7 @@ # for GCC: http://gcc.gnu.org/onlinedocs/gcc-3.0.4/gcc_3.html#IDX143 =20 .if !defined(NO_WARNS) +CFLAGS +=3D -Wsystem-headers . if defined(WARNS) . if ${WARNS} > 0 . if !defined(NO_WERROR) %%% Anyone objects to having this in? Cheers, --=20 Ruslan Ermilov Sysadmin and DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age --LpQ9ahxlCli8rRTG Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE+cMk2Ukv4P6juNwoRAh5SAJwJD+UUPCT00WIfdj2ks2jLp4z4OACffd12 yQ0mlAdbbg0gXWsZB0Lg7X8= =aXtq -----END PGP SIGNATURE----- --LpQ9ahxlCli8rRTG-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message