tag 356367 + patch
thanks

On Sat, Mar 11, 2006 at 02:42:44PM +0000, Martin Michlmayr wrote:
> Package: cmt
> Version: 1.15-3
> Severity: important
> 
> Your package fails to build with G++ 4.1.  I'm filing this bug as
> important for now, but when 4.1 will be the default compiler in
> unstable (probably in a few weeks) I'll upgrade this to serious.
> 
> 
> > Automatic build of cmt_1.15-3 on bigsur by sbuild/mips 1.86
> ...
> > g++ -I/usr/local/include/ -Wall -Werror -O3 -fPIC   -c -o 
> > freeverb/Components/allpass.o freeverb/Components/allpass.cpp
> > cc1plus: warnings being treated as errors
> > freeverb/Components/allpass.h: In member function 'float 
> > allpass::process(float)':
> > freeverb/Components/allpass.h:36: warning: dereferencing type-punned 
> > pointer will break strict-aliasing rules
> > make[1]: *** [freeverb/Components/allpass.o] Error 1

  attached a patch to fix that.

  note that if I understand the patched function correctly, it tries to
mess up with double IEEE representation, which looks rather ugly.
-- 
·O·  Pierre Habouzit
··O                                                [EMAIL PROTECTED]
OOO                                                http://www.madism.org
diff -Nrua cmt-1.15/src/freeverb/Components/allpass.h 
cmt-new/src/freeverb/Components/allpass.h
--- cmt-1.15/src/freeverb/Components/allpass.h  2001-05-08 21:39:29.000000000 
+0200
+++ cmt-new/src/freeverb/Components/allpass.h   2006-05-25 15:48:47.000000000 
+0200
@@ -33,7 +33,7 @@
        float bufout;
        
        bufout = buffer[bufidx];
-       undenormalise(bufout);
+       undenormalise(&bufout);
        
        output = -input + bufout;
        buffer[bufidx] = input + (bufout*feedback);
diff -Nrua cmt-1.15/src/freeverb/Components/comb.h 
cmt-new/src/freeverb/Components/comb.h
--- cmt-1.15/src/freeverb/Components/comb.h     2000-11-04 12:59:42.000000000 
+0100
+++ cmt-new/src/freeverb/Components/comb.h      2006-05-25 15:48:41.000000000 
+0200
@@ -38,10 +38,10 @@
        float output;
 
        output = buffer[bufidx];
-       undenormalise(output);
+       undenormalise(&output);
 
        filterstore = (output*damp2) + (filterstore*damp1);
-       undenormalise(filterstore);
+       undenormalise(&filterstore);
 
        buffer[bufidx] = input + (filterstore*feedback);
 
diff -Nrua cmt-1.15/src/freeverb/Components/denormals.h 
cmt-new/src/freeverb/Components/denormals.h
--- cmt-1.15/src/freeverb/Components/denormals.h        2000-11-04 
12:49:57.000000000 +0100
+++ cmt-new/src/freeverb/Components/denormals.h 2006-05-25 15:48:35.000000000 
+0200
@@ -8,7 +8,11 @@
 #ifndef _denormals_
 #define _denormals_
 
-#define undenormalise(sample) if(((*(unsigned int*)&sample)&0x7f800000)==0) 
sample=0.0f
+static void inline undenormalise(float *sample)
+{
+    if (((*(unsigned int*)sample) & 0x7f800000) == 0)
+        *sample = 0.0f;
+}
 
 #endif//_denormals_
 

Attachment: signature.asc
Description: Digital signature

Reply via email to