• Bug#266657: brahms: FTBFS with gcc-3.4: array bound forbidden after par

    From Enrique Robledo Arnuncio@1:229/2 to Andreas Jochens on Fri Aug 20 18:00:19 2004
    From: [email protected]

    I am applying the patch, and trying to figure out how to deal with it.
    Given the recent KDE-3.3 uploads to sid it would not be
    straightforward if I try to get this fix into sarge.

    Also, as far as I understand, the system compiler for sarge is gcc/g++
    3.3 in all architectures, so this is not a release critical bug (i.e.,
    your asigned severity is correct). Since we are off the non-urgency
    uploads deadline, this would probably not make it into sarge anyway.

    So I may wait a few days to see if the KDE libraries in sid settle
    down, and also to avoid loading the build daemos with non-sarge
    related builds.

    Thanks!

    Enrique.


    On Wed, Aug 18, 2004 at 05:51:25PM +0200, Andreas Jochens wrote:
    Package: brahms
    Severity: normal
    Tags: patch

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

    g++ -DHAVE_CONFIG_H -I. -I. -I../../.. -I/usr/include/kde -I/usr/include/qt3 -I/usr/X11R6/include -I../../../brahms/core -I../../../brahms -UQT_NO_ASCII_CAST -O2 -Wno-deprecated -fno-exceptions -fno-check-new -DQT_CLEAN_NAMESPACE -Wp,-MD,.deps/
    qtScoreSymbols.pp -c qtScoreSymbols.cpp -fPIC -DPIC -o .libs/qtScoreSymbols.o
    qtScoreSymbols.cpp: In constructor `QtSymbols::QtSymbols(PrScoreEditor*, QPixmap*, int&, int, int, const char*, int)':
    qtScoreSymbols.cpp:20: error: array bound forbidden after parenthesized type-id
    qtScoreSymbols.cpp:20: note: try removing the parentheses around the type-id make[5]: *** [qtScoreSymbols.lo] Error 1
    make[5]: Leaving directory `/brahms-1.02-kde3/brahms/presentations/kde'

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

    Regards
    Andreas Jochens

    diff -urN ../tmp-orig/brahms-1.02-kde3/brahms/addons/Riemann/harmony.cpp ./brahms/addons/Riemann/harmony.cpp
    --- ../tmp-orig/brahms-1.02-kde3/brahms/addons/Riemann/harmony.cpp 2002-01-07 00:35:46.000000000 +0100
    +++ ./brahms/addons/Riemann/harmony.cpp 2004-08-18 17:00:03.086872409 +0200
    @@ -45,7 +45,7 @@

    void Harmony::analyse() {
    // cout << endl << "ANALYSE: " << endl << sKey[_base_key] << " (" << sGenus[_base_gen] << ") " << sKey[_key] << " (" << sGenus[_genus] << ") : " << _chord;
    - for (Key s=UNDEFKEY; s<KEY; ((int) s)++) {
    + for (Key s=UNDEFKEY; s<KEY; (Key)(((int) s) + 1)) {
    _maj[s] = 0;
    _min[s] = 0;
    _dim[s] = 0;
    @@ -72,7 +72,7 @@
    Key mykey = UNDEFKEY;
    Genus mygen = UNDEFGEN;

    - for (Key k=GES; k<KEY; ((int)k)++) {
    + for (Key k=GES; k<KEY; (Key)(((int)k) + 1)) {
    if (max < _maj[k]) { max = _maj[k]; mykey = k; mygen = MAJOR; }
    if (max < _min[k]) { max = _min[k]; mykey = k; mygen = MINOR; }
    if (max < _dim[k]) { max = _dim[k]; mykey = k; mygen = DIMINISHED; } diff -urN ../tmp-orig/brahms-1.02-kde3/brahms/addons/Riemann/riemannEvent.cpp ./brahms/addons/Riemann/riemannEvent.cpp
    --- ../tmp-orig/brahms-1.02-kde3/brahms/addons/Riemann/riemannEvent.cpp 2002-01-07 00:35:46.000000000 +0100
    +++ ./brahms/addons/Riemann/riemannEvent.cpp 2004-08-18 16:58:25.325734361 +0200
    @@ -72,14 +72,14 @@

    Key RiemannEvent::key(const char * k) {
    Key key = UNDEFKEY;
    - for (Key i=UNDEFKEY; i<KEY; ((int) i)++)
    + for (Key i=UNDEFKEY; i<KEY; i = (Key)(((int)i) + 1))
    if (strcmp(k, sKey[i])==0) key = i;
    return key;
    }

    Genus RiemannEvent::genus(const char * g) {
    Genus genus = UNDEFGEN;
    - for (Genus i=UNDEFGEN; i<GENUS; ((int) i)++)
    + for (Genus i=UNDEFGEN; i<GENUS; (Key)(((int)i) + 1))
    if (strcmp(g, sGenus[i])==0) genus = i;
    return genus;
    }
    diff -urN ../tmp-orig/brahms-1.02-kde3/brahms/presentations/kde/qtScoreSymbols.cpp ./brahms/presentations/kde/qtScoreSymbols.cpp
    --- ../tmp-orig/brahms-1.02-kde3/brahms/presentations/kde/qtScoreSymbols.cpp 2002-01-07 00:35:46.000000000 +0100
    +++ ./brahms/presentations/kde/qtScoreSymbols.cpp 2004-08-18 16:47:08.473631521 +0200
    @@ -17,7 +17,7 @@
    rows = int(total/cols);
    if (cols*rows<total) rows++;

    - button = new (QPushButton *) [total];
    + button = new QPushButton * [total];
    setCaption(name);

    // KIconLoader *loader = KGlobal::iconLoader();


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

    --- 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 Wed Aug 18 18:40:07 2004
    From: [email protected]

    Package: brahms
    Severity: normal
    Tags: patch

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

    g++ -DHAVE_CONFIG_H -I. -I. -I../../.. -I/usr/include/kde -I/usr/include/qt3 -I/usr/X11R6/include -I../../../brahms/core -I../../../brahms -UQT_NO_ASCII_CAST -O2 -Wno-deprecated -fno-exceptions -fno-check-new -DQT_CLEAN_NAMESPACE -Wp,-MD,.deps/
    qtScoreSymbols.pp -c qtScoreSymbols.cpp -fPIC -DPIC -o .libs/qtScoreSymbols.o qtScoreSymbols.cpp: In constructor `QtSymbols::QtSymbols(PrScoreEditor*, QPixmap*, int&, int, int, const char*, int)':
    qtScoreSymbols.cpp:20: error: array bound forbidden after parenthesized type-id qtScoreSymbols.cpp:20: note: try removing the parentheses around the type-id make[5]: *** [qtScoreSymbols.lo] Error 1
    make[5]: Leaving directory `/brahms-1.02-kde3/brahms/presentations/kde'

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

    Regards
    Andreas Jochens

    diff -urN ../tmp-orig/brahms-1.02-kde3/brahms/addons/Riemann/harmony.cpp ./brahms/addons/Riemann/harmony.cpp
    --- ../tmp-orig/brahms-1.02-kde3/brahms/addons/Riemann/harmony.cpp 2002-01-07 00:35:46.000000000 +0100
    +++ ./brahms/addons/Riemann/harmony.cpp 2004-08-18 17:00:03.086872409 +0200
    @@ -45,7 +45,7 @@

    void Harmony::analyse() {
    // cout << endl << "ANALYSE: " << endl << sKey[_base_key] << " (" << sGenus[_base_gen] << ") " << sKey[_key] << " (" << sGenus[_genus] << ") : " << _chord;
    - for (Key s=UNDEFKEY; s<KEY; ((int) s)++) {
    + for (Key s=UNDEFKEY; s<KEY; (Key)(((int) s) + 1)) {
    _maj[s] = 0;
    _min[s] = 0;
    _dim[s] = 0;
    @@ -72,7 +72,7 @@
    Key mykey = UNDEFKEY;
    Genus mygen = UNDEFGEN;

    - for (Key k=GES; k<KEY; ((int)k)++) {
    + for (Key k=GES; k<KEY; (Key)(((int)k) + 1)) {
    if (max < _maj[k]) { max = _maj[k]; mykey = k; mygen = MAJOR; }
    if (max < _min[k]) { max = _min[k]; mykey = k; mygen = MINOR; }
    if (max < _dim[k]) { max = _dim[k]; mykey = k; mygen = DIMINISHED; }
    diff -urN ../tmp-orig/brahms-1.02-kde3/brahms/addons/Riemann/riemannEvent.cpp ./brahms/addons