Re: lvalue cast warnings

2003-09-01 Thread Andy Dougherty
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 defe

Re: lvalue cast warnings

2003-08-31 Thread Benjamin Goldberg
Leopold Toetsch wrote: > > Nicholas Clark <[EMAIL PROTECTED]> wrote: > > -#define PMC_sub(pmc) ((parrot_sub_t)((pmc)->cache.pmc_val)) > > +#define PMC_sub(pmc) (*((parrot_sub_t *)&((pmc)->cache.pmc_val))) > > This seems to work. Thanks for the patch. > (the tcc tinderbox seems to be missing a m

Re: lvalue cast warnings

2003-08-30 Thread Leopold Toetsch
Nicholas Clark <[EMAIL PROTECTED]> wrote: > -#define PMC_sub(pmc) ((parrot_sub_t)((pmc)->cache.pmc_val)) > +#define PMC_sub(pmc) (*((parrot_sub_t *)&((pmc)->cache.pmc_val))) This seems to work. Thanks for the patch. (the tcc tinderbox seems to be missing a make realclean/Configure or such though)

Re: lvalue cast warnings

2003-08-29 Thread Nicholas Clark
On Fri, Aug 29, 2003 at 08:05:33PM +0200, Leopold Toetsch wrote: > Andy Dougherty <[EMAIL PROTECTED]> wrote: > > > "closure.pmc", line 21: warning: a cast does not yield an lvalue > > tcc fails totally. Its of cource me to blame :-) > > What is the "official" way here: > - don't do that, its rea

Re: lvalue cast warnings

2003-08-29 Thread Leopold Toetsch
Andy Dougherty <[EMAIL PROTECTED]> wrote: > "closure.pmc", line 21: warning: a cast does not yield an lvalue tcc fails totally. Its of cource me to blame :-) What is the "official" way here: - don't do that, its really forbidden (why) - create another macro acround that? The lvalue usage isn't

Re: lvalue cast warnings

2003-08-29 Thread Simon Glover
On Fri, 29 Aug 2003, Andy Dougherty wrote: > On a fresh checkout today, my Solaris C compiler issued the following > warnings. If memory serves, there are other compilers that don't > like lvalue casts as well. lcc & tcc to name two; only with these, it's an error, not just a warning. Si