PATCH (3.0.X branch): Allow C++ compilation with -Wshadow -Werror
Loren James Rittle
rittle@latour.rsch.comm.mot.com
Mon Jan 28 13:01:00 GMT 2002
Reviewed by Benjamin, Paolo and myself. Tested with no regressions on
i386-unknown-freebsd4.5 (rebuilt libstdc++-v3 from scratch) and
installed on 3.0.X branch.
> I agree this is the same issue discussed in libstdc++/3561.
(thus I have closed it with further analysis since now fixed on
both mainline and branch.)
2002-01-28 Jens Rehsack <rehsack@web.de>
libstdc++/3561
* include/bits/ostream.tcc (__pad_char): Support -Wshadow -Werror.
Index: ostream.tcc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/ostream.tcc,v
retrieving revision 1.2.2.5
diff -c -r1.2.2.5 ostream.tcc
*** ostream.tcc 2001/06/11 19:37:49 1.2.2.5
--- ostream.tcc 2002/01/28 20:22:26
***************
*** 487,497 ****
// Pad after 0[xX], if there is one.
// Who came up with these rules, anyway? Jeeze.
typedef _Format_cache<_CharT> __cache_type;
! __cache_type const* __fmt = __cache_type::_S_get(__ios);
const char_type* __minus = traits_type::find(__olds, __oldlen,
! __fmt->_S_minus);
const char_type* __plus = traits_type::find(__olds, __oldlen,
! __fmt->_S_plus);
bool __testsign = __minus || __plus;
bool __testhex = __olds[0] == '0'
&& (__olds[1] == 'x' || __olds[1] == 'X');
--- 487,497 ----
// Pad after 0[xX], if there is one.
// Who came up with these rules, anyway? Jeeze.
typedef _Format_cache<_CharT> __cache_type;
! __cache_type const* __lfmt = __cache_type::_S_get(__ios);
const char_type* __minus = traits_type::find(__olds, __oldlen,
! __lfmt->_S_minus);
const char_type* __plus = traits_type::find(__olds, __oldlen,
! __lfmt->_S_plus);
bool __testsign = __minus || __plus;
bool __testhex = __olds[0] == '0'
&& (__olds[1] == 'x' || __olds[1] == 'X');
More information about the Libstdc++
mailing list