This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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]

Re: Building dejagnu with latest GCC


kenner@vlsi1.ultra.nyu.edu (Richard Kenner) writes:

[...]

| /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

Changing setbuf to pusetbuf solves this one.

| unit.cc:64: warning: ISO C++ forbids assignment of arrays

But, I can't solve this one in one line.

Here are the definitions that are flagged:

   // somewhere in dejagnu.h
  char *outstate[] = {
      "FAILED: ",
      "PASSED: ",
      "UNTESTED: ",
      "UNRESOLVED: "
  };


   // somewhere in unit.cc
   char *os1[] = {
       "FAI: ",
       "PAS: ",
       "UNT: ",
       "UNR: "
   };

   char *os2[] = {
       "FAILED: ",
       "PASSED: ",
       "UNTESTED: ",
       "UNRESOLVED: "
   };

   int
   main (int argc, char *argv[]) {
       regex_t regex_pat;

   //    char **os2 = outstate;
       outstate = os1;


Array assignment aren't even valid in C.

-- Gaby


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