From owner-freebsd-toolchain@FreeBSD.ORG Wed Mar 26 20:00:14 2014 Return-Path: Delivered-To: freebsd-toolchain@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 501C1610; Wed, 26 Mar 2014 20:00:14 +0000 (UTC) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "tensor.andric.com", Issuer "CAcert Class 3 Root" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0BAEB366; Wed, 26 Mar 2014 20:00:13 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::5cdf:5701:2dff:9241] (unknown [IPv6:2001:7b8:3a7:0:5cdf:5701:2dff:9241]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 39CCB5C43; Wed, 26 Mar 2014 21:00:05 +0100 (CET) Content-Type: multipart/signed; boundary="Apple-Mail=_4D60DC5B-59BF-4A7A-9400-B8EC0CCD811E"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) Subject: Re: stray warning from gcc's cpp From: Dimitry Andric In-Reply-To: Date: Wed, 26 Mar 2014 20:59:55 +0100 Message-Id: <43ADA601-3DE6-47AB-86F1-CDAB15BB0C50@FreeBSD.org> References: <53296A34.1060108@FreeBSD.org> To: Andriy Gapon X-Mailer: Apple Mail (2.1874) Cc: freebsd-toolchain@FreeBSD.org X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Mar 2014 20:00:14 -0000 --Apple-Mail=_4D60DC5B-59BF-4A7A-9400-B8EC0CCD811E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 19 Mar 2014, at 21:00, Dimitry Andric wrote: > On 19 Mar 2014, at 10:58, Andriy Gapon wrote: >>=20 >> I observe the following minor annoyance on FreeBSD systems where cpp = is GCC's >> cpp. If a DTrace script has the following shebang line: >> #!/usr/sbin/dtrace -Cs >> then the following warning is produced when the script is run: >> cc1: warning: is shorter than expected >>=20 >> Some details. dtrace(1) first forks. Then a child seeks on a file = descriptor >> associated with the script file, so that the shebang line is skipped = (because >> otherwise it would confuse cpp). Then the child makes the file = descriptor its >> standard input and then it execs cpp. cpp performs fstat(2) on its = standard >> input descriptor and determines that it points to a regular file. = Then it >> verifies that a number of bytes it reads from the file is the same as = a size of >> the file. The check makes sense if the file is opened by cpp itself, = but it >> does not always make sense for the stdin as described above. ... I committed an updated fix in r263775. -Dimitry --Apple-Mail=_4D60DC5B-59BF-4A7A-9400-B8EC0CCD811E Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iEYEARECAAYFAlMzMcAACgkQsF6jCi4glqMaIgCgyifXLZ1jBoCAhBeLBd7mZfww AmsAoI5Axjdomr9raYQx2XzGPG783tCA =vHx7 -----END PGP SIGNATURE----- --Apple-Mail=_4D60DC5B-59BF-4A7A-9400-B8EC0CCD811E--