Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Fwd: type-checking for metafiedness? (was: Re: Cores almost on demand in patcompile())



[My apologies if this has appeared before, I got an error the first
time it doesn't seem to have come back to me through the list yet.]

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;

(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