On 19 Mar 2014, at 21:00, Dimitry Andric <[email protected]> wrote:
> On 19 Mar 2014, at 10:58, Andriy Gapon <[email protected]> wrote:
>> 
>> 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
>> 
>> 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

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to