This is the mail archive of the gcc-patches@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: [v3 PATCH]: Fix bootstrap failure on powerpc-apple-darwin7.9.0


On Sun, 30 Jul 2006, Paolo Carlini wrote:
> Could you please test _Tp instead, more consistent with the rest of the
> library? Pre-approved of course.

Thanks.  _Tp works fine (given that this is used elsewhere this should
be no big surprise).  Retested with a top-level "make bootstrap" on
powerpc-apple-darwin7.9.0.  Committed to mainline as revision 115823.

Thanks again for the speedy review.


2006-07-30  Roger Sayle  <roger@eyesopen.com>

	* include/ext/codevt_specializations.h (__iconv_adaptor): Use
	identifier _Tp instead of _T in template argument to avoid conflict.


Index: include/ext/codecvt_specializations.h
===================================================================
*** include/ext/codecvt_specializations.h	(revision 115817)
--- include/ext/codecvt_specializations.h	(working copy)
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 301,312 ****
    // argument to iconv():  SUSv2 and others use 'const char**', but glibc 2.2
    // uses 'char**', which matches the POSIX 1003.1-2001 standard.
    // Using this adaptor, g++ will do the work for us.
!   template<typename _T>
      inline size_t
!     __iconv_adaptor(size_t(*__func)(iconv_t, _T, size_t*, char**, size_t*),
                      iconv_t __cd, char** __inbuf, size_t* __inbytes,
                      char** __outbuf, size_t* __outbytes)
!     { return __func(__cd, (_T)__inbuf, __inbytes, __outbuf, __outbytes); }

    template<typename _InternT, typename _ExternT>
      codecvt_base::result
--- 301,312 ----
    // argument to iconv():  SUSv2 and others use 'const char**', but glibc 2.2
    // uses 'char**', which matches the POSIX 1003.1-2001 standard.
    // Using this adaptor, g++ will do the work for us.
!   template<typename _Tp>
      inline size_t
!     __iconv_adaptor(size_t(*__func)(iconv_t, _Tp, size_t*, char**, size_t*),
                      iconv_t __cd, char** __inbuf, size_t* __inbytes,
                      char** __outbuf, size_t* __outbytes)
!     { return __func(__cd, (_Tp)__inbuf, __inbytes, __outbuf, __outbytes); }

    template<typename _InternT, typename _ExternT>
      codecvt_base::result

Roger
--


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