This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tui/21482] gdb 8.0 tui doesn't build with native curses on Solaris


https://sourceware.org/bugzilla/show_bug.cgi?id=21482

--- Comment #2 from Rainer Orth <ro at CeBiTec dot Uni-Bielefeld.DE> ---
> --- Comment #1 from Yao Qi <qiyao at gcc dot gnu.org> ---
> Close this issue as it is fixed by
> https://sourceware.org/ml/gdb-patches/2017-05/msg00287.html ?

They are completely unrelated, unfortunately: this one persists even
after the fix above went in.

The problem boils down to

$ cat cc.c
#include <string.h>

const char *str = "msg";

void
func (char *str)
{
  (void) strlen (str);
}

void
call (void)
{
  func (str);
}
$ g++ -c -O2 -Wall -c cc.c
cc.c: In function 'void call()':
cc.c:14:12: error: invalid conversion from 'const char*' to 'char*'
[-fpermissive]
   func (str);
            ^
cc.c:6:1: note:   initializing argument 1 of 'void func(char*)'
 func (char *str)
 ^~~~

However (as I wasn't aware initially), you can simply cast the constness
away in all calls to mvwaddstr.  I'll give that a whirl.

        Rainer

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]