Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: type-checking for metafiedness? (was: Re: Cores almost on demand in patcompile())
- X-seq: zsh-workers 39656
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: type-checking for metafiedness? (was: Re: Cores almost on demand in patcompile())
- Date: Sun, 16 Oct 2016 17:03:19 +0000
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=yTsh8uqhM42P/nPS9Ig7phyIbU0=; b=2LJmdP 3flZNLnv0ttkq/MQRs4j5K5WH5It0VMETcVPCujWuWsT+Q2+VtVctEydYiXKZlPk hEnvVnW/raoX5eZRJF6O94kLnY8YYAtjsm1zvOm0tNy36bUQtdySFhSTyVpIJtat SWXws5VidoI3RDmmMvN9VXg3NT7eOL0d+Zqqw=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=yTsh8uqhM42P/nPS9Ig7phyIbU0=; b=UfSWR 5abxi6AiRUP3zRxotOMue1i99CeTodyTXbWbfRKiSj9nnKgb+sqmUVbnksL2EUrY VK7BuNomGFXZR7msx3IL31+ou68HYkrgG+TzS1543hVRq81eQGwrsDGpKMsNnu9l +kV8hkCA76tsJbaty3xzOztisDuS13JuCZ+K2E=
- In-reply-to: <alpine.LRH.2.00.1610151812300.4693@toltec.zanshin.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <alpine.LRH.2.00.1610151812300.4693@toltec.zanshin.com>
Bart Schaefer wrote on Sat, Oct 15, 2016 at 18:14:44 -0700:
> On Sat, Oct 15, 2016 at 1:30 AM, Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> >
> > Does anyone have a way to get type checking that doesn't involve
> > adding .v everywhere?
>
> Wouldn't it suffice to use
> typedef char *unmeta_t;
> typedef unsigned char *meta_t;
>
Another option: use incomplete struct types:
.
typedef char *unmeta_t;
typedef struct incomplete_meta_t *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?
>
> I hadn't even considered all the places where using a struct would
> change memory allocation strategy. Oof.
>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author