From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4209 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH v2] shadow: Implement putspent Date: Fri, 8 Nov 2013 01:37:07 +0100 Message-ID: <20131108003707.GE1685@port70.net> References: <20131105192416.GE24286@brightrain.aerifal.cx> <1383690600-24170-1-git-send-email-mforney@mforney.org> <20131105233148.GJ24286@brightrain.aerifal.cx> <1383744054.23727.44.camel@eris.loria.fr> <20131106163640.GN24286@brightrain.aerifal.cx> <1383863701.11028.154.camel@eris.loria.fr> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1383871038 654 80.91.229.3 (8 Nov 2013 00:37:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 8 Nov 2013 00:37:18 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-4213-gllmg-musl=m.gmane.org@lists.openwall.com Fri Nov 08 01:37:20 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Vea4d-0005b9-AD for gllmg-musl@plane.gmane.org; Fri, 08 Nov 2013 01:37:19 +0100 Original-Received: (qmail 15375 invoked by uid 550); 8 Nov 2013 00:37:18 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 15367 invoked from network); 8 Nov 2013 00:37:18 -0000 Content-Disposition: inline In-Reply-To: <1383863701.11028.154.camel@eris.loria.fr> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:4209 Archived-At: * Jens Gustedt [2013-11-07 23:35:01 +0100]: > The second variant isn't a cas?? but a conversion and it just checks if > S is assignment compatible with `char const*`. A completely type safe > variant then would be > > #define STR(S) ((S) ? (char const*){ (S) } : (char const[]){ 0 }) > > which wouldn't imply any conversion. (And which a compiler *may* > realize by using a static object for the empty string.) yes but we are talking about a translation unit that implements a single function with a single fprintf call fprintf does not modify its arguments so any hackery around the const qualifier is just clutter