Bug 79694
Summary: | libstdc++ headers: explicit specialization of function must precede its first use | ||||||
---|---|---|---|---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Sysoltsev Slawa <vyatcheslav.sysoltsev> | ||||
Component: | gcc3 | Assignee: | Jakub Jelinek <jakub> | ||||
Status: | CLOSED UPSTREAM | QA Contact: | |||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 8.0 | CC: | bkoz | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2004-10-01 14:57:26 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Sysoltsev Slawa
2002-12-15 13:21:04 UTC
Created attachment 88743 [details]
Patch with changes to <fstream> to made it more correct according C++ standard
This patch applies to gcc-3_3-branch and gcc-3_2-branch, but not mainline. 2003-01-10 Benjamin Kosnik <bkoz> Sysoltsev Slawa <Vyatcheslav.Sysoltsev> PR libstdc++/ * include/std/std_fstream.h (basic_filebuf::uflow): Declare. (basic_filebuf::underflow): Declare. Move definitions. Index: include/std/std_fstream.h =================================================================== RCS file: /cvs/gcc/gcc/libstdc++-v3/include/std/std_fstream.h,v retrieving revision 1.15 diff -c -p -r1.15 std_fstream.h *** include/std/std_fstream.h 27 Dec 2002 23:03:03 -0000 1.15 --- include/std/std_fstream.h 11 Jan 2003 00:51:37 -0000 *************** namespace std *** 234,244 **** // [documentation is inherited] virtual int_type ! underflow() { return _M_underflow_common(false); } // [documentation is inherited] virtual int_type ! uflow() { return _M_underflow_common(true); } // [documentation is inherited] virtual int_type --- 234,244 ---- // [documentation is inherited] virtual int_type ! underflow(); // [documentation is inherited] virtual int_type ! uflow(); // [documentation is inherited] virtual int_type *************** namespace std *** 431,437 **** } }; ! // Explicit specializations, defined in src/fstream.cc. template<> basic_filebuf<char>::int_type basic_filebuf<char>::_M_underflow_common(bool __bump); --- 431,437 ---- } }; ! // Explicit specialization declarations, defined in src/fstream.cc. template<> basic_filebuf<char>::int_type basic_filebuf<char>::_M_underflow_common(bool __bump); *************** namespace std *** 441,446 **** --- 441,458 ---- basic_filebuf<wchar_t>::int_type basic_filebuf<wchar_t>::_M_underflow_common(bool __bump); #endif + + // Generic definitions. + template <typename _CharT, typename _Traits> + basic_filebuf<_CharT, _Traits>::int_type + basic_filebuf<_CharT, _Traits>::underflow() + { return _M_underflow_common(false); } + + template <typename _CharT, typename _Traits> + basic_filebuf<_CharT, _Traits>::int_type + basic_filebuf<_CharT, _Traits>::uflow() + { return _M_underflow_common(true); } + // [27.8.1.5] Template class basic_ifstream /** Fixed in gcc-3.4.x. Intel compilers are much more strict about this. I believe this was fixed in 3.3.x as well. Closing, reopen if believe I am in error. -benjamin |