beware of dumpOSC (was Re: [OSC_dev] No dumpOSC output in pipe in
non-interactive terminal)
IOhannes m zmoelnig
zmoelnig at iem.at
Sat Sep 8 22:32:08 PDT 2007
hi
Stephen Sinclair wrote:
> Looking at the dumpOSC.c source file, there is nothing special
apart from the fact that dumpOSC uses some pointer casting magic.
this seriously screws up, when you just use the code in a naive way and
turn on compiler optimization.
(gcc>=3.0 and "-fstrict-alignment" cannot be used in conjunction with
pointer reinterpret casts)
i just recently discovered this problem in one of Pd's
OSC-implementations [1], which is basically a copy'n'paste of dumpOSC.
if you want to use dumpOSC code and use compiler optimization at the
same time, you should fix this e.g. by explicitely using unions.
mmfga.sdr
IOhannes
[1] see
http://sourceforge.net/tracker/index.php?func=detail&aid=1788587&group_id=55736&atid=478070
for my troubles...
More information about the OSC_dev
mailing list