On Sat, Feb 21, 2015 at 09:55:53AM +0100, k...@shike2.com wrote:
> Hi,
> 
> >     char *name;   /* string representation of op           */
> > -   int   type;   /* from Tok.type                         */
> > -   int   prec;   /* precedence                            */
> > -   int   nargs;  /* number of arguments (unary or binary) */
> > -   int   lassoc; /* left associative                      */
> > +   char  type;   /* from Tok.type                         */
> > +   char  prec;   /* precedence                            */
> > +   char  nargs;  /* number of arguments (unary or binary) */
> > +   char  lassoc; /* left associative                      */
> >  } Op_info;
> 
> I don't have any problem with the patch, but the advantage of this
> patch depends too much of which machine you are using.  In a
> i386/x86-64 the code is going to be similar and you are going to save
> memory, but in other processors maybe you need aditional operations to
> transform the char (which can be signed or unsigned) to integer.  I
> usually put flags as integers because you don't save too much
> (if you have four options like this case) and you don't know if the
> code is going to be smaller or not.

Agreed, I use ints too.  I do not mind the patch as is so I am going
to merge it.

Reply via email to