This is the mail archive of the libstdc++@sources.redhat.com mailing list for the libstdc++ project.


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

libstdc++, sparc-sun-solaris8, and -ansi


The following smal program fails for me on sparc-sun-solaris8 once I
specify -ansi:

  #include <iostream>
  int main() { }

% gccvs x.cc -ansi
In file included from /sw/test/gcc/SunOS/include/g++-v3/bits/stl_alloc.h:53,
                 from /sw/test/gcc/SunOS/include/g++-v3/bits/stl_string_fwd.h:18,
                 from /sw/test/gcc/SunOS/include/g++-v3/bits/std_ios.h:40,
                 from /sw/test/gcc/SunOS/include/g++-v3/bits/std_ostream.h:37,
                 from /sw/test/gcc/SunOS/include/g++-v3/bits/std_iostream.h:38,
                 from /sw/test/gcc/SunOS/include/g++-v3/iostream:2,
                 from x.cc:1:
/sw/test/gcc/SunOS/include/g++-v3/bits/std_cstdlib.h:51: `lldiv_t' not declared
/sw/test/gcc/SunOS/include/g++-v3/bits/std_cstdlib.h:102: syntax error before `(' token
/sw/test/gcc/SunOS/include/g++-v3/bits/std_cstdlib.h:103: syntax error before `.' token

And the corresponding lines in std_cstdlib.h read:

 49  #ifdef _GLIBCPP_USE_LONG_LONG
 50  # ifdef _GLIBCPP_HAVE_LLDIV_T
 51   using ::lldiv_t;
 52  # else
 53    struct lldiv_t
 54    {
 55     long long quot;
 56     long long rem;
 57    };
 58  # endif
 59  #endif

Original system headers for solaris2.8 are at the usual location:
  http://www.dbai.tuwien.ac.at/~pfeifer/tmp/include.solaris8/

Gerald
-- 
Gerald "Jerry" pfeifer@dbai.tuwien.ac.at http://www.dbai.tuwien.ac.at/~pfeifer/


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