Date: Wed, 26 Mar 2014 20:59:55 +0100 From: Dimitry Andric <dim@FreeBSD.org> To: Andriy Gapon <avg@FreeBSD.org> Cc: freebsd-toolchain@FreeBSD.org Subject: Re: stray warning from gcc's cpp Message-ID: <43ADA601-3DE6-47AB-86F1-CDAB15BB0C50@FreeBSD.org> In-Reply-To: <E0220F76-0FE3-4F9D-8110-4E228F06E3F0@FreeBSD.org> References: <53296A34.1060108@FreeBSD.org> <E0220F76-0FE3-4F9D-8110-4E228F06E3F0@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--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 <dim@freebsd.org> wrote: > On 19 Mar 2014, at 10:58, Andriy Gapon <avg@FreeBSD.org> 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43ADA601-3DE6-47AB-86F1-CDAB15BB0C50>