I have ~16k lines of 1998 vintage C code (~50 main progs) which built flawlessly under gcc at that time but now fails with many \"lvalue required as left operand of assignme
gcc is no longer allowing you to assign to a cast.
i.e.
((CELL *)(cell)->car) = free_list;
is no longer legal. Instead of casting the lhs to match the rhs, it would rather you cast the rhs to match the lhs. One way around this is to take the address of the lvalue, cast it as a pointer, and then dereference that pointer, so the assignment is to a pointer dereference instead of a cast.
i.e.
*((CELL **)&(cell)->car) = free_list;
This can be handled by updating the macros, so it should be quite painless...
i.e.
#define cell_car(c) (*((CELL **)&(c)->car))
etc...
This macro can then be used as either an lvalue or an rvalue.