This is an interesting error. We can't treat the sp and pointer variables as lvalues to do assignments when we cast to non-reference pointers. This makes sense, it is interesting that gcc just now decided to care. Thanks Niklas. Best, Ge! On Jul 12, 2004, at 12:07 AM, Niklas Werner wrote:
On Mon, 12 Jul 2004 15:23, Ge Wang wrote:
change line 49 to:
#define push_uint( sp, val ) *((uint*&)sp) = val; ((uint*&)sp)++
Does this fix it?
yes.
BUT: gcc -D__LINUX_ALSA__ -O3 -g -c ugen_osc.cpp ugen_osc.cpp: In function `void sinosc_cget_freq(double, void*, void*)': ugen_osc.cpp:179: error: ISO C++ forbids cast to non-reference type used as lvalue
and several more related to the set of macros SET_NEXT_*() and GET_NEXT_*() changing all of them accordingly to:
#define SET_NEXT_FLOAT(ptr,v) (*((t_CKFLOAT *&)ptr)++=v)
etc. makes chuck compile and run with gcc-3.4.1 (I just quickly ran the examples, not sure whether this breaks anything else.)
Cheers,
Niklas -- Computer Music PhD-student University of Waikato Hamilton New Zealand _______________________________________________ chuck-dev mailing list chuck-dev@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-dev