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())

[I originally sent this 12 hours ago but it still hasn't shown up in the
mailing list archives.  Seems to be problems with mail from the gmail web
interface again.  Sorry if this eventually appears multiple times.]

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