March 24, 2005 Re: -wc is too good | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | stlport/stl/_ios.c Line 83: this->_M_cached_grouping = static_cast<numpunct<char_type>*>(_M_cached_numpunct)->grouping() ; |
March 24, 2005 Re: -wc is too good [build and runs recls fine] | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | Last one: stdarg.h #ifdef __cplusplus # define va_start(ap, parmn) (static_cast<void>((ap) = static_cast<va_list>(&(parmn)) + __va_size(parmn))) #else /* ? __cplusplus */ # define va_start(ap, parmn) ((void)((ap) = (va_list)&(parmn) + __va_size(parmn))) #endif /* __cplusplus */ #define va_arg(ap, type) (*(type __SS *)(((ap)+=__va_size(type)) - (__va_size(type)))) #ifdef __cplusplus # define va_end(ap) (static_cast<void>(0)) #else /* ? __cplusplus */ # define va_end(ap) ((void)0) #endif /* __cplusplus */ #define va_copy(dest, src) ((dest) = (src)) I've built recls 1.6.2 with -wc, and with all the changes posted today. It runs perfectly fine. The upshot was that of all the c-style casts: - most were within STLport. (And from what I've been exposed to of STLport as a result, I'm rather glad I'm not working on its development) - a few were within std headers - some were within Windows headers. Since this'd be a gargantuan task to fix, I've contented myself to #undef/#define within winstl.h and using some of the components from within winstl_windows_type_conversions.h - quite a few were within STLSoft headers. The result is that: - I found some bugs within DMC++'s string.h, which otherwise would have continued to lay there, undiscovered - found quite a few dodgy things within STLSoft, which are now fixed - had a few annoying little things (such as changing "((void)0)" to "static_cast<void>(0)" - got the heeby-geebies about STLport. I'd say 30% of the totality of things found were worth having attention drawn to them, 30% were annoying irrelevances, and 40% were worth at least looking at (and now more maintainable for having had their casting actions documented more unambiguously). I'd say it was well worth the effort, and I will, now that I've got DMC++'s headers fixed, be using -wc wherever I can. :-) Cheers Matthew |
March 24, 2005 Re: -wc is too good | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | stlport/stl/_algobase.h Line 225: return static_cast<_OutputIter>(__copy_trivial_backward(__first, __last, __result)); |
March 24, 2005 Re: -wc is too good | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | stlport/stl/_vector.h Line 118: return _STLP_CONVERT_ALLOCATOR(static_cast<const allocator_type&>(this->_M_end_of_storage), _Tp); Line 156: pointer __new_finish = static_cast<pointer>(__copy_trivial(this->_M_start, __position, __new_start)); Line 161: __new_finish = static_cast<pointer>(__copy_trivial(__position, this->_M_finish, __new_finish)); |
March 24, 2005 Re: -wc is too good | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | stlport/stl/_fstream.h Line 149: int __o_mode() const { return static_cast<int>(_M_openmode); } Line 355: this->setg(static_cast<char_type*>(_M_ext_buf), static_cast<char_type*>(_M_ext_buf), static_cast<char_type*>(_M_ext_buf_end)); |
March 24, 2005 Re: -wc is too good | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | stlport/stl/_fstream.c Line 310: streamoff __adjust = _M_mmap_len - (this->gptr() - static_cast<_CharT*>(_M_mmap_base)); Line 447: if (this->is_open() && ((static_cast<int>(_M_base.__o_mode()) & static_cast<int>(ios_base::in)) !=0) |
March 24, 2005 Re: -wc is too good | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | stlport/stl/_bvector.h Line 68: bool __tmp = static_cast<bool>(__x); Line 106: _M_offset = static_cast<unsigned int>(__n) + __WORD_BIT; Line 109: _M_offset = static_cast<unsigned int>(__n); |
March 24, 2005 Re: -wc is too good | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | stlport/stl/_num_put.c Line 146: char* __iend = __write_float(__buf, __f.flags(), static_cast<int>(__f.precision()), __x); Line 149: const numpunct<_CharT>& __np = *static_cast<const numpunct<_CharT>*>(__f._M_numpunct_facet()); Line 253: const numpunct<char>& __np = *static_cast<const numpunct<char>*>(__f._M_numpunct_facet()); Line 270: copy(__buf, __iend, static_cast<char*>(__grpbuf)); Line 302: *--__ptr = static_cast<int>(__temp % 10) + '0'; Line 316: *--__ptr = static_cast<int>(__x % 10) + '0'; Line 342: *--__ptr = (static_cast<unsigned>(__temp)& 0x7) + '0'; Line 358: *--__ptr = __table_ptr[(static_cast<unsigned>(__temp) & 0xF)]; Line 443: const numpunct<_CharT>& __np = *static_cast<const numpunct<_CharT>*>(__f._M_numpunct_facet()); Line 446: static_cast<_CharT>(0), static_cast<_CharT>(0)); Line 459: char* __ibeg = __write_integer_backward(static_cast<char*>(__buf) + 64, __flags, __val); Line 460: return __put_integer(__ibeg, static_cast<char*>(__buf) + 64, __s, __f, __flags, __fill); Line 472: char* __ibeg = __write_integer_backward(static_cast<char*>(__buf) + 64, __flags, __val); Line 473: return __put_integer(__ibeg, static_cast<char*>(__buf) + 64, __s, __f, __flags, __fill); Line 501: char* __ibeg = __write_integer_backward(static_cast<char*>(__buf) + 64, __flags, __val); Line 502: return __put_integer(__ibeg, static_cast<char*>(__buf) + 64, __s, __f, __flags, __fill); Line 513: char* __ibeg = __write_integer_backward(static_cast<char*>(__buf) + 64, __flags, __val); Line 514: return __put_integer(__ibeg, static_cast<char*>(__buf) + 64, __s, __f, __flags, __fill); |
March 24, 2005 Re: -wc is too good | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | stlport/stl/_vector.c Line 95: pointer __tmp = _M_allocate_and_copy(__xlen, static_cast<const_pointer>(__x._M_start) + 0, static_cast<const_pointer>(__x._M_finish) + 0); Line 101: pointer __i = __copy_ptrs(static_cast<const_pointer>(__x._M_start) + 0, static_cast<const_pointer>(__x._M_finish) + 0, static_cast<pointer>(this->_M_start), _TrivialAss()); Line 105: __copy_ptrs(static_cast<const_pointer>(__x._M_start), static_cast<const_pointer>(__x._M_start) + size(), static_cast<pointer>(this->_M_start), _TrivialAss()); |
Copyright © 1999-2021 by the D Language Foundation