Building dejagnu with latest GCC

Gabriel Dos Reis gdr@integrable-solutions.net
Sun Aug 4 04:31:00 GMT 2002


Jason Merrill <jason@redhat.com> writes:

| Does -fpermissive help?

Hi,

  -fpermissive doesn't help for the accessibility problem 

  /usr/local/include/c++/3.2/streambuf:416: `std::basic_streambuf<_CharT,
     _Traits>* std::basic_streambuf<_CharT, _Traits>::setbuf(_CharT*, long int)
     [with _CharT = char, _Traits = std::char_traits<char>]' is protected
  unit.cc:53: within this context

The piece of code incrimintated is:

    streambuf *sb =  cout.rdbuf();
    char bbuuff[5120];
    sb->setbuf(bbuuff, 5120);

streambuf::setbuf() is protected and is there only for derived
classes. For public use, the right function is streambuf::pubsetbuf().
Kenner, please could try to replace

    sb->setbuf(bbuuff, 5120);

with

    sb->pubsetbuf(bbuuff, 5120);

and report what happens?

Thanks,

-- Gaby



More information about the Gcc mailing list