diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index c0083db16c0..92887bd863a 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,15 @@ +2001-02-22 Benjamin Kosnik + + * tests_flags.in (CXXFLAGS): Add -rpath to gcc build dir. + + * include/bits/codecvt.h: Use alloca instead of __extension__ for + the time being. + * include/bits/ostream.tcc: Same. + * include/bits/std_ostream.h: Same. + * include/bits/fstream.tcc: Same. + * include/bits/locale_facets.tcc: Add typename. + * include/bits/c++config (_GLIBCPP_FULLY_COMPLIANT_HEADERS): Enable. + 2001-02-21 Phil Edwards * tests_flags.in: Remove -n flag from call to echo. diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config index 9143f7b58e3..dfbd40612a2 100644 --- a/libstdc++-v3/include/bits/c++config +++ b/libstdc++-v3/include/bits/c++config @@ -47,7 +47,7 @@ // types. For the io library, this means that larger, out-of-line // member functions are only declared, and definitions are not parsed // by the compiler, but instead instantiated into the library binary. -// #define _GLIBCPP_FULLY_COMPLIANT_HEADERS 1 +#define _GLIBCPP_FULLY_COMPLIANT_HEADERS 1 // To enable older, ARM-style iostreams and other anachronisms use this. //#define _GLIBCPP_DEPRECATED 1 diff --git a/libstdc++-v3/include/bits/codecvt.h b/libstdc++-v3/include/bits/codecvt.h index 68ff5e6de42..17aabb3895a 100644 --- a/libstdc++-v3/include/bits/codecvt.h +++ b/libstdc++-v3/include/bits/codecvt.h @@ -419,7 +419,7 @@ if (__int_bom) { size_t __size = __from_end - __from; - __extension__ intern_type __cfixed[__size + 1]; + intern_type* __cfixed = static_cast(alloca(sizeof(intern_type) * (__size + 1))); __cfixed[0] = static_cast(__int_bom); char_traits::copy(__cfixed + 1, __from, __size); __cfrom = reinterpret_cast(__cfixed); @@ -524,7 +524,7 @@ if (__ext_bom) { size_t __size = __from_end - __from; - __extension__ extern_type __cfixed[__size + 1]; + extern_type* __cfixed = (sizeof(extern_type) * (__size + 1)); __cfixed[0] = static_cast(__ext_bom); char_traits::copy(__cfixed + 1, __from, __size); __cfrom = reinterpret_cast(__cfixed); diff --git a/libstdc++-v3/include/bits/fstream.tcc b/libstdc++-v3/include/bits/fstream.tcc index be31be06635..76b820ab9de 100644 --- a/libstdc++-v3/include/bits/fstream.tcc +++ b/libstdc++-v3/include/bits/fstream.tcc @@ -262,7 +262,7 @@ namespace std // Part one: (Re)fill external buf (_M_file->_IO_*) from // external byte sequence (whatever physical byte sink or // FILE actually is.) - __extension__ char_type __conv_buf[_M_buf_size]; + char_type* __conv_buf = static_cast(alloca(sizeof(char_type) * _M_buf_size)); streamsize __size = _M_file->xsgetn(__conv_buf, _M_buf_size); // Part two: (Re)fill internal buf contents from external buf. @@ -436,7 +436,7 @@ namespace std // stack. Convert internal buffer plus __c (ie, // "pending sequence") to temporary conversion buffer. int __plen = _M_out_end - _M_out_beg; - __extension__ char_type __pbuf[__plen + 1]; + char_type* __pbuf = static_cast(alloca(sizeof(char_type) * __plen + 1)); traits_type::copy(__pbuf, this->pbase(), __plen); if (!__testeof) { @@ -445,7 +445,7 @@ namespace std } char_type* __pend; - __extension__ char __conv_buf[__plen]; + char* __conv_buf = static_cast(alloca(__plen)); char* __conv_end; _M_state_beg = _M_state_cur; diff --git a/libstdc++-v3/include/bits/locale_facets.tcc b/libstdc++-v3/include/bits/locale_facets.tcc index 38c4c0ccf1e..8555236d9b3 100644 --- a/libstdc++-v3/include/bits/locale_facets.tcc +++ b/libstdc++-v3/include/bits/locale_facets.tcc @@ -722,8 +722,8 @@ namespace std template _RaIter - __pad(_RaIter __s, _CharT __fill, int __padding, - random_access_iterator_tag) + __pad(_RaIter __s, _CharT __fill, int __padding, + random_access_iterator_tag) { fill_n(__s, __fill); return __s + __padding; @@ -741,8 +741,8 @@ namespace std inline _OutIter __pad(_OutIter __s, _CharT __fill, int __padding) { - return __pad(__s, __fill, __padding, - iterator_traits<_OutIter>::iterator_category()); + return __pad(__s, __fill, __padding, + typename iterator_traits<_OutIter>::iterator_category()); } template diff --git a/libstdc++-v3/include/bits/ostream.tcc b/libstdc++-v3/include/bits/ostream.tcc index 77bce2616da..6464f5bad37 100644 --- a/libstdc++-v3/include/bits/ostream.tcc +++ b/libstdc++-v3/include/bits/ostream.tcc @@ -417,7 +417,7 @@ namespace std { typedef typename traits_type::int_type int_type; int_type __plen = static_cast(__newlen - __oldlen); - __extension__ char_type __pads[__plen]; + char_type* __pads = static_cast(alloca(sizeof(char_type) * __plen)); traits_type::assign(__pads, __plen, __ios.fill()); char_type* __beg; @@ -496,7 +496,7 @@ namespace std { { try { streamsize __w = __out.width(); - __extension__ _CharT __pads[__w]; + _CharT* __pads = static_cast<_CharT*>(alloca(sizeof(_CharT) * __w)); __pads[0] = __c; streamsize __len = 1; if (__w > __len) @@ -529,7 +529,7 @@ namespace std { { try { streamsize __w = __out.width(); - __extension__ char __pads[__w + 1]; + char* __pads = static_cast(alloca(__w + 1)); __pads[0] = __c; streamsize __len = 1; if (__w > __len) @@ -596,7 +596,7 @@ namespace std { if (__cerb) { size_t __clen = __ctraits_type::length(__s); - __extension__ _CharT __ws[__clen + 1]; + _CharT* __ws = static_cast<_CharT*>(alloca(sizeof(_CharT) * (__clen + 1))); for (size_t __i = 0; __i <= __clen; ++__i) __ws[__i] = __out.widen(__s[__i]); _CharT* __str = __ws; @@ -604,7 +604,7 @@ namespace std { try { streamsize __len = static_cast(__clen); streamsize __w = __out.width(); - __extension__ _CharT __pads[__w]; + _CharT* __pads = static_cast<_CharT*>(alloca(sizeof(_CharT) * __w)); if (__w > __len) { @@ -637,7 +637,7 @@ namespace std { { try { streamsize __w = __out.width(); - __extension__ char __pads[__w]; + char* __pads = static_cast(alloca(__w)); streamsize __len = static_cast(_Traits::length(__s)); if (__w > __len) { diff --git a/libstdc++-v3/include/bits/std_ostream.h b/libstdc++-v3/include/bits/std_ostream.h index 2666b3c4b0b..d6fcab6df56 100644 --- a/libstdc++-v3/include/bits/std_ostream.h +++ b/libstdc++-v3/include/bits/std_ostream.h @@ -281,10 +281,3 @@ namespace std { #endif #endif /* _CPP_OSTREAM */ - - - - - - - diff --git a/libstdc++-v3/tests_flags.in b/libstdc++-v3/tests_flags.in index e738ca474f8..f900a8db483 100644 --- a/libstdc++-v3/tests_flags.in +++ b/libstdc++-v3/tests_flags.in @@ -23,8 +23,8 @@ # needed to run library specific tests, # BUILD_DIR:SRC_DIR:PREFIX_DIR:CXX:CXXFLAGS:INCLUDES:LIBS # the meaning of which is as follows: -# BUILD_DIR build-dir -# SRC_DIR src-dir +# BUILD_DIR libstdc++-v3 build-dir +# SRC_DIR libstdc++-v3 src-dir # PREFIX_DIR install-dir (meaningful only with --installed-library) # CXX which C++ compiler is being used # CXXFLAGS special flags to pass to g++ @@ -122,11 +122,13 @@ esac # For built or installed libraries, we need to get right OS-specific bits. . ${SRC_DIR}/configure.target -# LIB_PATH == where to find the build libraries for libtool's use +# LIB_PATH == where to find the C++ build libraries for libtool's use +# GCC_LIB_PATH == where to find the gcc build libraries for libtool's use # CXX == the full pathname of the compiler case ${query} in --built-library) LIB_PATH=${BUILD_DIR}/src + GCC_LIB_PATH=${BUILD_DIR}/../../gcc CXX="${BUILD_DIR}/../../gcc/g++" ;; --installed-library) @@ -143,7 +145,7 @@ CXXFLAGS="-ggdb3 -DDEBUG_ASSERT @SECTION_FLAGS@ @SECTION_LDFLAGS@" case ${query} in --built-library) LIBS="${LIB_PATH}/../libsupc++/libsupc++.la ${LIB_PATH}/libstdc++.la - -no-install" + -no-install -rpath ${GCC_LIB_PATH}" case @target_os@ in *cygwin*) LIBS="${LIBS} -nodefaultlibs -lgcc -lcygwin -luser32 -lkernel32 -ladvapi32 -lshell32" ;;