[chuck-dev] compile error gcc-3.4.1

Niklas Werner bergtroll at gmx.li
Mon Jul 12 00:07:13 EDT 2004


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


More information about the chuck-dev mailing list