On Fri, 29 Aug 2003, Nicholas Clark wrote:

> > Andy Dougherty <[EMAIL PROTECTED]> wrote:
> >
> > > "closure.pmc", line 21: warning: a cast does not yield an lvalue

> I think that the appended patch will work around the problem, by doing
> the case on the pointer (which is an RVALUE) and then deferencing.

> --- include/parrot/sub.h.orig 2003-08-29 21:09:19.000000000 +0100
> +++ include/parrot/sub.h      2003-08-29 21:14:26.000000000 +0100
> @@ -33,7 +33,7 @@ typedef struct Parrot_Sub {
>      char *packed;       /* to simplify packing Constant Subs */
>  } * parrot_sub_t;
>
> -#define PMC_sub(pmc) ((parrot_sub_t)((pmc)->cache.pmc_val))
> +#define PMC_sub(pmc) (*((parrot_sub_t *)&((pmc)->cache.pmc_val)))
>
>  /* the first entries must match Parrot_Sub, so we can cast
>   * these two to the other type
>

Thanks.  That worked just fine.

    Andy Dougherty              [EMAIL PROTECTED]

Reply via email to