• Bug#263817: supercollider: FTBFS with gcc-3.4: ISO C++ forbids cast to

    From Paul Brossier@1:229/2 to Andreas Jochens on Thu Aug 12 14:40:08 2004
    From: [email protected]

    Hi Andreas,

    thanks for your feedback. the new version available at
    http://piem.org/debian/ should fix the problem. let me know how it goes
    for you.

    cheers, piem


    On Thu, Aug 05, 2004 at 11:09:20PM +0200, Andreas Jochens wrote:
    Package: supercollider
    Severity: normal
    Tags: patch

    When building 'supercollider' with gcc-3.4 I get the following error:

    x86_64-linux-g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../headers/common -I../../headers/plugin_interface -I../../headers/server -DSC_LINUX -D_REENTRANT -Wall -Wno-unknown-pragmas -DNDEBUG -g -O2 -MT PhysicalModelingUGens.lo -MD -MP -MF .deps/
    PhysicalModelingUGens.Tpo -c PhysicalModelingUGens.cpp -fPIC -DPIC -o .libs/PhysicalModelingUGens.o
    In file included from ../../headers/plugin_interface/SC_InlineUnaryOp.h:25,
    from ../../headers/plugin_interface/SC_PlugIn.h:28,
    from PhysicalModelingUGens.cpp:25: ../../headers/plugin_interface/SC_Constants.h:46:7: warning: no newline at end of file
    PhysicalModelingUGens.cpp: In function `void Ball_next(Ball*, int)': PhysicalModelingUGens.cpp:242: error: ISO C++ forbids cast to non-reference type used as lvalue
    PhysicalModelingUGens.cpp: In function `void TBall_next(TBall*, int)': PhysicalModelingUGens.cpp:324: error: ISO C++ forbids cast to non-reference type used as lvalue
    make[4]: *** [PhysicalModelingUGens.lo] Error 1
    make[4]: Leaving directory `/supercollider-040709/source/plugins'

    With the attached patch 'supercollider' can be compiled using gcc-3.4.

    Regards
    Andreas Jochens

    diff -urN ../tmp-orig/supercollider-040709/source/plugins/PhysicalModelingUGens.cpp ./source/plugins/PhysicalModelingUGens.cpp
    --- ../tmp-orig/supercollider-040709/source/plugins/PhysicalModelingUGens.cpp 2004-07-02 07:12:01.000000000 +0200
    +++ ./source/plugins/PhysicalModelingUGens.cpp 2004-08-05 22:51:32.169133161 +0200
    @@ -236,11 +236,7 @@
    float inter = c * 1000.f;
    RGen& rgen = *unit->mParent->mRGen;
    float g = c * g_in;
    -#ifdef _MSC_VER
    k *= g_in; // stickyness proportional to gravity
    -#else //#ifdef _MSC_VER
    - (double) k *= g_in; // stickyness proportional to gravity
    -#endif //#ifdef _MSC_VER

    LOOP(inNumSamples,

    @@ -318,11 +314,7 @@
    float inter = c * 10000.f;
    RGen& rgen = *unit->mParent->mRGen;
    float g = c * g_in;
    -#ifdef _MSC_VER
    k *= g_in; // stickyness proportional to gravity
    -#else //#ifdef _MSC_VER
    - (double) k *= g_in; // stickyness proportional to gravity
    -#endif //#ifdef _MSC_VER

    LOOP(inNumSamples,



    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.5 (GNU/Linux)

    iD8DBQFBG2EX2PLmgVuXpdIRAg40AKCc6PWVtcSBHP/jWDrbcSmxbc92zgCfSSq4 LyqfMpgLJEpk3bYxJhwkNlk=
    =hUbC
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From Andreas Jochens@1:229/2 to All on Thu Aug 5 23:30:15 2004
    From: [email protected]

    Package: supercollider
    Severity: normal
    Tags: patch

    When building 'supercollider' with gcc-3.4 I get the following error:

    x86_64-linux-g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../headers/common -I../../headers/plugin_interface -I../../headers/server -DSC_LINUX -D_REENTRANT -Wall -Wno-unknown-pragmas -DNDEBUG -g -O2 -MT PhysicalModelingUGens.lo -MD -MP -MF .deps/
    PhysicalModelingUGens.Tpo -c PhysicalModelingUGens.cpp -fPIC -DPIC -o .libs/PhysicalModelingUGens.o
    In file included from ../../headers/plugin_interface/SC_InlineUnaryOp.h:25,
    from ../../headers/plugin_interface/SC_PlugIn.h:28,
    from PhysicalModelingUGens.cpp:25: ../../headers/plugin_interface/SC_Constants.h:46:7: warning: no newline at end of file
    PhysicalModelingUGens.cpp: In function `void Ball_next(Ball*, int)': PhysicalModelingUGens.cpp:242: error: ISO C++ forbids cast to non-reference type used as lvalue
    PhysicalModelingUGens.cpp: In function `void TBall_next(TBall*, int)': PhysicalModelingUGens.cpp:324: error: ISO C++ forbids cast to non-reference type used as lvalue
    make[4]: *** [PhysicalModelingUGens.lo] Error 1
    make[4]: Leaving directory `/supercollider-040709/source/plugins'

    With the attached patch 'supercollider' can be compiled using gcc-3.4.

    Regards
    Andreas Jochens

    diff -urN ../tmp-orig/supercollider-040709/source/plugins/PhysicalModelingUGens.cpp ./source/plugins/PhysicalModelingUGens.cpp
    --- ../tmp-orig/supercollider-040709/source/plugins/PhysicalModelingUGens.cpp 2004-07-02 07:12:01.000000000 +0200
    +++ ./source/plugins/PhysicalModelingUGens.cpp 2004-08-05 22:51:32.169133161 +0200
    @@ -236,11 +236,7 @@
    float inter = c * 1000.f;
    RGen& rgen = *unit->mParent->mRGen;
    float g = c * g_in;
    -#ifdef _MSC_VER
    k *= g_in; // stickyness proportional to gravity
    -#else //#ifdef _MSC_VER
    - (double) k *= g_in; // stickyness proportional to gravity
    -#endif //#ifdef _MSC_VER

    LOOP(inNumSamples,

    @@ -318,11 +314,7 @@
    float inter = c * 10000.f;
    RGen& rgen = *unit->mParent->mRGen;
    float g = c * g_in;
    -#ifdef _MSC_VER
    k *= g_in; // stickyness proportional to gravity
    -#else //#ifdef _MSC_VER
    - (double) k *= g_in; // stickyness proportional to gravity
    -#endif //#ifdef _MSC_VER

    LOOP(inNumSamples,



    --
    To UNSUBSCRIBE, email to [email protected]
    with a subject of "unsubscribe". Trouble? Contact [email protected]

    --- SoupG