This is the mail archive of the libstdc++@gcc.gnu.org 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]

[V3 PATCH] Fix for defect report libstdc++/1894


Again, this is another one of those errors that should have shown
up long ago, but seems to have gotten past the compiler as long
as -fno-default-inline is not enabled.  The compiler recognizes it
as an error if that option is used.


2001-02-13  Greg Bumgardner <bumgard@roguewave.com>

	* libstdc++-v3/include/bits/istream.tcc: See next...
	* libstdc++-v3/include/bits/ostream.tcc: Add typename keyword to
	sentry decls 

Index: gcc/libstdc++-v3/include/bits/istream.tcc
diff -c gcc/libstdc++-v3/include/bits/istream.tcc:1.1.1.1 gcc/libstdc++-v3/include/bits/istream.tcc:1.1.1.1.16.1
*** gcc/libstdc++-v3/include/bits/istream.tcc:1.1.1.1	Tue Feb 13 00:20:16 2001
--- gcc/libstdc++-v3/include/bits/istream.tcc	Tue Feb 13 11:35:24 2001
***************
*** 988,994 ****
      operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
      {
        typedef basic_istream<_CharT, _Traits> 		__istream_type;
!       __istream_type::sentry __cerb(__in, false);
        if (__cerb)
  	{
  	  try {
--- 988,994 ----
      operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
      {
        typedef basic_istream<_CharT, _Traits> 		__istream_type;
!       typename __istream_type::sentry __cerb(__in, false);
        if (__cerb)
  	{
  	  try {
***************
*** 1018,1024 ****
        typedef ctype<_CharT>     			__ctype_type;
        int_type __extracted = 0;
  
!       __istream_type::sentry __cerb(__in, false);
        if (__cerb)
  	{
  	  try {
--- 1018,1024 ----
        typedef ctype<_CharT>     			__ctype_type;
        int_type __extracted = 0;
  
!       typename __istream_type::sentry __cerb(__in, false);
        if (__cerb)
  	{
  	  try {
***************
*** 1115,1121 ****
        typedef typename __string_type::size_type		__size_type;
        __int_type __extracted = 0;
  
!       __istream_type::sentry __cerb(__in, false);
        if (__cerb) 
  	{
  	  __str.erase();
--- 1115,1121 ----
        typedef typename __string_type::size_type		__size_type;
        __int_type __extracted = 0;
  
!       typename __istream_type::sentry __cerb(__in, false);
        if (__cerb) 
  	{
  	  __str.erase();
***************
*** 1166,1172 ****
  
        __size_type __extracted = 0;
        bool __testdelim = false;
!       __istream_type::sentry __cerb(__in, true);
        if (__cerb) 
  	{
  	  __str.erase();
--- 1166,1172 ----
  
        __size_type __extracted = 0;
        bool __testdelim = false;
!       typename __istream_type::sentry __cerb(__in, true);
        if (__cerb) 
  	{
  	  __str.erase();
Index: gcc/libstdc++-v3/include/bits/ostream.tcc
diff -c gcc/libstdc++-v3/include/bits/ostream.tcc:1.1.1.1 gcc/libstdc++-v3/include/bits/ostream.tcc:1.1.1.1.16.1
*** gcc/libstdc++-v3/include/bits/ostream.tcc:1.1.1.1	Tue Feb 13 00:20:46 2001
--- gcc/libstdc++-v3/include/bits/ostream.tcc	Tue Feb 13 11:35:24 2001
***************
*** 491,497 ****
      operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
      {
        typedef basic_ostream<_CharT, _Traits> __ostream_type;
!       __ostream_type::sentry __cerb(__out);
        if (__cerb)
  	{
  	  try {
--- 491,497 ----
      operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
      {
        typedef basic_ostream<_CharT, _Traits> __ostream_type;
!       typename __ostream_type::sentry __cerb(__out);
        if (__cerb)
  	{
  	  try {
***************
*** 524,530 ****
      operator<<(basic_ostream<char, _Traits>& __out, char __c)
      {
        typedef basic_ostream<char, _Traits> __ostream_type;
!       __ostream_type::sentry __cerb(__out);
        if (__cerb)
  	{
  	  try {
--- 524,530 ----
      operator<<(basic_ostream<char, _Traits>& __out, char __c)
      {
        typedef basic_ostream<char, _Traits> __ostream_type;
!       typename __ostream_type::sentry __cerb(__out);
        if (__cerb)
  	{
  	  try {
***************
*** 556,562 ****
      operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
      {
        typedef basic_ostream<_CharT, _Traits> __ostream_type;
!       __ostream_type::sentry __cerb(__out);
        if (__cerb)
  	{
  	  try {
--- 556,562 ----
      operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
      {
        typedef basic_ostream<_CharT, _Traits> __ostream_type;
!       typename __ostream_type::sentry __cerb(__out);
        if (__cerb)
  	{
  	  try {
***************
*** 592,598 ****
  // 167.  Improper use of traits_type::length()
        typedef char_traits<char>		     __ctraits_type;
  #endif
!       __ostream_type::sentry __cerb(__out);
        if (__cerb)
  	{
  	  size_t __clen = __ctraits_type::length(__s);
--- 592,598 ----
  // 167.  Improper use of traits_type::length()
        typedef char_traits<char>		     __ctraits_type;
  #endif
!       typename __ostream_type::sentry __cerb(__out);
        if (__cerb)
  	{
  	  size_t __clen = __ctraits_type::length(__s);
***************
*** 632,638 ****
      operator<<(basic_ostream<char, _Traits>& __out, const char* __s)
      {
        typedef basic_ostream<char, _Traits> __ostream_type;
!       __ostream_type::sentry __cerb(__out);
        if (__cerb)
  	{
  	  try {
--- 632,638 ----
      operator<<(basic_ostream<char, _Traits>& __out, const char* __s)
      {
        typedef basic_ostream<char, _Traits> __ostream_type;
!       typename __ostream_type::sentry __cerb(__out);
        if (__cerb)
  	{
  	  try {


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