From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14630 invoked by alias); 18 Oct 2016 11:47:02 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 39673 Received: (qmail 9292 invoked from network); 18 Oct 2016 11:47:02 -0000 X-Qmail-Scanner-Diagnostics: from mailout3.w1.samsung.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(210.118.77.13):SA:0(-0.3/5.0):. Processed in 0.480219 secs); 18 Oct 2016 11:47:02 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=RP_MATCHES_RCVD autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: p.stephenson@samsung.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at samsung.com does not designate permitted sender hosts) X-AuditID: cbfec7f1-f79f46d0000008eb-dd-580609542465 Date: Tue, 18 Oct 2016 12:36:47 +0100 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: type-checking for metafiedness? (was: Re: Cores almost on demand in patcompile()) Message-id: <20161018123647.2f918189@pwslap01u.europe.root.pri> In-reply-to: Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrLIsWRmVeSWpSXmKPExsWy7djPc7ohnGwRBsv+qlgcbH7I5MDoserg B6YAxigum5TUnMyy1CJ9uwSujM5HRxgLnnBVfL5ym7WB8QVHFyMnh4SAicTHp6fYIGwxiQv3 1gPZXBxCAksZJda9mc8O4fQyS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AG8TmF9CX uPr3E9R99hIzr5xhhOgVlPgx+R5YPbOAlsTmbU2sELa8xOY1b5kh5qhL3Li7m30Co/AsJC2z kLTMQtKygJF5FaNIamlxbnpusZFecWJucWleul5yfu4mRmAcbTv2c8sOxq53wYcYBTgYlXh4 N1xhiRBiTSwrrsw9xCjBwawkwrufmS1CiDclsbIqtSg/vqg0J7X4EKMpMGAmMkuJJucDYzyv JN7QxNDc0tDI2MLC3MhISZx36ocr4UIC6YklqdmpqQWpRTB9TBycUg2Mq442ZvWkfdSpC8y7 9eqfz61/1VMqhZmvzJH07/0ycfeTGyLsS7qvs/Cn211QmCbRvc140sm5RmeePFvYobIh4JfS sfJO1WVx5RObOisPnd2ro7O79dHS/Tz5Qgv2BsunaPs4Tz7/UPm25AVl9km7rQuEqr7qLapb lfU+oTHY35Btyay3n2vPKrEUZyQaajEXFScCAKtvXpy5AgAA X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20161018113652eucas1p185a474136c61c4ecd6285b0c749e5ebf X-Msg-Generator: CA X-Sender-IP: 182.198.249.180 X-Local-Sender: =?UTF-8?B?UGV0ZXIgU3RlcGhlbnNvbhtTQ1NDLURhdGEgUGxhbmUb?= =?UTF-8?B?7IK87ISx7KCE7J6QG1ByaW5jaXBhbCBFbmdpbmVlciwgU29mdHdhcmU=?= X-Global-Sender: =?UTF-8?B?UGV0ZXIgU3RlcGhlbnNvbhtTQ1NDLURhdGEgUGxhbmUbU2Ft?= =?UTF-8?B?c3VuZyBFbGVjdHJvbmljcxtQcmluY2lwYWwgRW5naW5lZXIsIFNvZnR3YXJl?= X-Sender-Code: =?UTF-8?B?QzEwG0VIURtDMTBDRDA1Q0QwNTAwNTg=?= CMS-TYPE: 201P X-HopCount: 7 X-CMS-RootMailID: 20161016014741eucas1p189be6c2fa19aaf9d31733cae5f716178 X-RootMTR: 20161016014741eucas1p189be6c2fa19aaf9d31733cae5f716178 References: On Sat, 15 Oct 2016 18:14:44 -0700 Bart Schaefer wrote: > Wouldn't it suffice to use > typedef char *unmeta_t; > typedef unsigned char *meta_t; > > (or the reverse if we believe we're mostly going to be working on > meta_t). If we do that and also enable the GCC warnings -Wtype-limits > -Wconversion -Wformat-signedness would we not get adequate verbosity > without changing pointer arithmetic and dereferencing? -Wformat-signedness didn't exist when I tried (old version, 4.5.1), but adding -Wtype-limits and -Wconversion produced 2348 type conversion errors and 63 implicit conversion of negative integer errors. But we don't need new warnings --- compilers, including gcc, are much more finnicky about converting pointer types than the base types, and assigning individual characters from strings around isn't part of our problems (except where we alrady have the STOUC() hack). The only possible subtlety is on some systems char is already unsigned. However, it seems gcc considers all three of "unsigned char *", "signed char *", and "char *" as distinct pointer types and making meta_t either of the first two throws up errors like: ptr.c:11:9: warning: comparison of distinct pointer types lacks a cast So this looks workable. Obviously this means continuing to keep unmetafied lengths separate. pws