#59 Error message "Less than 8 bpp not currently supported."

open
nobody
None
5
2012-11-29
2004-08-30
Egbert König
No

On my 24bpp display I got the error message "Less than 8 bpp
not currently supported." which was not truely right.

I have found that a too aggressive compiler optimization was
causing this error in ui_init(). pfm-entries have obviously not
been examined with the right index value.

The appended patch fixes this problem with gcc 3.3.

Discussion

  • Egbert König
    Egbert König
    2004-08-30

    unidiff patch against rdesktop repository

     
  • Peter Åstrand
    Peter Åstrand
    2005-08-23

    Logged In: YES
    user_id=344921

    Is this patch a workaround for a compiler bug, or a fix for
    an actualy rdesktop bug?

     
  • Egbert König
    Egbert König
    2005-08-24

    Logged In: YES
    user_id=482843

    This patch is a workaround for a compiler bug. With the while (--i)
    construct the gcc optimized code did not use i correctly as index
    in the loop body. Because off that always pfm[0] has been
    evaluated instead off pfm[i].

     
  • Peter Åstrand
    Peter Åstrand
    2005-08-24

    Logged In: YES
    user_id=344921

    To me, it looks like your suggested patch changes the
    behaviour even for correct compilers: The current loop loops
    from i-1 to 0. With your patch, the loop goes from i-1 to 1.

     
  • Egbert König
    Egbert König
    2005-08-27

    Logged In: YES
    user_id=482843

    You are right, but that was not the goal. The for loop should be for
    (--i; i >= 0; --i).

     
  • Peter Åstrand
    Peter Åstrand
    2005-08-27

    Logged In: YES
    user_id=344921

    Which compilers suffers from this bug? I tend to think that
    it's better to think the actual problem: the compiler.