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

Please, do NOT use GCC as development compiler (or, at least, turn on some conformance checking).



parse.c  2426: [error]:   CFE1137 expression must be a modifiable lvalue
        fdflags(pre) = (map ? FDF_MAP : 0) | other;
        ^

parse.c  2427: [error]:   CFE1137 expression must be a modifiable lvalue
        fdsetother(pre, tlen);
        ^

parse.c  2427: [error]:   CFE1137 expression must be a modifiable lvalue
        fdsetother(pre, tlen);
        ^

parse.c  2427: [error]:   CFE1137 expression must be a modifiable lvalue
        fdsetother(pre, tlen);


That all originates from fdbyte() macro, that looks like:

#define fdbyte(f, i)     ((wordcode) (((unsigned char *) (((Wordcode) (f)) +
1))[i]))

You take a _char_ value and cast it to wordcode == int. This_is_not_lvalue
and can not be assigned to (most probable implementation is temporary
storage in stack or register). I have no idea, what GCC does with it.

So, the simplest way is to provide two sets of macros - GET and SET. And,
BTW, why are they in lower case? I'd prefer such macros in upper case - as
is customary in C ...

cheers

/andrej



Messages sorted by: Reverse Date, Date, Thread, Author