From owner-freebsd-standards@freebsd.org Wed Feb 21 19:15:05 2018 Return-Path: Delivered-To: freebsd-standards@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08579F21ACA for ; Wed, 21 Feb 2018 19:15:05 +0000 (UTC) (envelope-from wollman@khavrinen.csail.mit.edu) Received: from khavrinen.csail.mit.edu (khavrinen.csail.mit.edu [IPv6:2603:400a:0:7ec::801e:1c14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "khavrinen.csail.mit.edu", Issuer "Client CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id A93816D537 for ; Wed, 21 Feb 2018 19:15:04 +0000 (UTC) (envelope-from wollman@khavrinen.csail.mit.edu) Received: from khavrinen.csail.mit.edu (localhost [127.0.0.1]) by khavrinen.csail.mit.edu (8.15.2/8.15.2) with ESMTPS id w1LJF4xD001021 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL CN=khavrinen.csail.mit.edu issuer=Client+20CA); Wed, 21 Feb 2018 14:15:04 -0500 (EST) (envelope-from wollman@khavrinen.csail.mit.edu) Received: (from wollman@localhost) by khavrinen.csail.mit.edu (8.15.2/8.15.2/Submit) id w1LJF4xf001020; Wed, 21 Feb 2018 14:15:04 -0500 (EST) (envelope-from wollman) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <23181.50488.186767.579361@khavrinen.csail.mit.edu> Date: Wed, 21 Feb 2018 14:15:04 -0500 From: Garrett Wollman To: Konstantin Belousov Cc: freebsd-standards@freebsd.org Subject: Re: Marking select(2) as restrict In-Reply-To: <20180221185920.GA94212@kib.kiev.ua> References: <20180221032247.GA81670@ns.kevlo.org> <20180221104400.GU94212@kib.kiev.ua> <23181.46427.671514.319710@khavrinen.csail.mit.edu> <20180221185920.GA94212@kib.kiev.ua> X-Mailer: VM 8.2.0b under 25.3.1 (amd64-portbld-freebsd10.3) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (khavrinen.csail.mit.edu [127.0.0.1]); Wed, 21 Feb 2018 14:15:04 -0500 (EST) X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Feb 2018 19:15:05 -0000 < said: >> [I wrote:] >> Compliance with the 2001 POSIX standard (and subsequent versions). >> >> After C99, all POSIX interfaces that use pointers were updated to >> include the restrict qualifier where applicable. > Restrict barely puts any requirements on the implementation, but does on > the consumers. Which is the cause of this discussion. I can't speak to this particular case, but my understanding is that "restrict" qualifier was only added to arguments if the behavior was already unspecified or undefined when the pointers in question were aliases (so the consumer was already broken if it did so). Certainly such code has been broken for the better part of two decades. > Also, what incompliance consequences are ? I am not even sure that the > prototype mismatch can be detected by means other than parsing the headers. It is permissible for an application to explicitly declare any function defined in the standard, so long as it uses the prototype set out in the standard. Also, any vendor wanting POSIX or UNIX certification for a derivative system would have to fix it anyway. -GAWollman