From owner-freebsd-toolchain@FreeBSD.ORG Fri Apr 10 16:13:47 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 42DC627C for ; Fri, 10 Apr 2015 16:13:47 +0000 (UTC) Received: from nm47-vm6.bullet.mail.bf1.yahoo.com (nm47-vm6.bullet.mail.bf1.yahoo.com [216.109.115.141]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1DBDECC for ; Fri, 10 Apr 2015 16:13:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1428682294; bh=BVaUxACt7znPvtqpGR46JmiE742nW8IuoMaCbwQP23w=; h=Date:From:To:Subject:From:Subject; b=svizQtq4vEFRPaUlf34loKKWdiPxsJ/2Yy1HivjpXA331srMlLdVNcT6cqHhcAg8hA/Oo59c7y3FiK5fCT4TtHVkgeoK4Fp65q8jNYbZXdU58BqNXfBqX60zrU3Bya1a2nN67Zoew16PFKtPgveoIebi6a4r03qpwrSHB9x1R22ssrDuQvYbHUVEjktDiWeIzqhKqX5WnHr9MR1TrJ7EjUkkPnf3j9W9eesCsR1PjTgpggehcFqTtOTq9VDksc7uvb+GDJfVwgPYifnX3RULCmEKHJezG3nI6VvbhxubL29Y/P58cPt/mE0Fc8zGVlPZOqUCUoQ4eFrkxVuLBLNTuQ== Received: from [98.139.215.142] by nm47.bullet.mail.bf1.yahoo.com with NNFMP; 10 Apr 2015 16:11:34 -0000 Received: from [68.142.230.65] by tm13.bullet.mail.bf1.yahoo.com with NNFMP; 10 Apr 2015 16:11:34 -0000 Received: from [127.0.0.1] by smtp222.mail.bf1.yahoo.com with NNFMP; 10 Apr 2015 16:11:34 -0000 X-Yahoo-Newman-Id: 214180.16519.bm@smtp222.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: gTjA.sgVM1n4LXcFIMwO17OdSvKyWyD9y3J0IwwmjzINUB8 UqLp0DouQ3_ht90sbQsvJSCBSwx7YPDBkrhDQn.d8lw.cr4I_6YEmtjgS3kO UmZVs0Km1mJKauHxTrkUnhFGJD9lQkCiz_0U39591KZkPyG6ePPtW962lZmS SKWJogTqdasjHHXIIBeoC2lzHZiX4ICs0AML6WknaQdIJ._Io.1dC8f0KiJa EG7OmZtr0ONpuX_UKus7JXVkGzffHLp67cH3Ks7YlVgihsh5Bim3lT5ZhSI1 Eifdc36q.Gr7EYSYC5NnkqYYZ_ZY5LSclRB6SNzrcFgtOKx3cG0h9_YI7hxm o82AT_fmPsQ1bN9gDSpvLdUg7uI9.VGHyjittQDzdsSSAkxvTfRZMlBE4rkk .OM6rd8T1QFTmXEQAT2DNQaCvh4b3q.Q40uDgv1M8NxAk__JdFQ5SU81Hxdf a28oYZpDrcZR7nllpyVdGUkdH1W_azaZ72YwDwL5XN7i9JToZBo2twemwyvv KGx_AjqT5xYKborOxzShDIZFmdthYU_e8 X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <5527F638.9090609@FreeBSD.org> Date: Fri, 10 Apr 2015 11:11:36 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: freebsd-toolchain@FreeBSD.org Subject: type-safety checks for fcntl and ioctl Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 16:13:47 -0000 Hello; I had a try on adding the ioctl() and fcntl() clang attributes to our system headers but failed miserably, apparently due to xlint issues: ... fcntl.h(307): syntax error [249] ... There is few documentation about this [1][2] so I am sharing the link of my (simple but probably incomplete) experiment in case someone feels like picking it up some day: https://people.freebsd.org/~pfg/patches/fcntl-type-safety.diff Regards, Pedro. References: [1] http://clang.llvm.org/docs/AttributeReference.html#type-safety-checking [2] http://hpc-ua.org/hpc-ua-12/files/proceedings/3.pdf