libstdc++/9269: libstdc++ headers: explicit specialization of function must precede its first use
bkoz@redhat.com
bkoz@redhat.com
Sat Jan 11 01:16:00 GMT 2003
>Number: 9269
>Category: libstdc++
>Synopsis: libstdc++ headers: explicit specialization of function must precede its first use
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jan 10 17:16:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: Sysoltsev Slawa
>Release: gcc-3.2.x, gcc-3.3.c, gcc
>Organization:
>Environment:
x86 linux
>Description:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=79694
this fix cannot be applied on mainline, due to this error:
/mnt/hd/ahimsa/bld-x86-gcc/gcc/xgcc -shared-libgcc -B/mnt/hd/ahimsa/bld-x86-gcc/gcc/ -nostdinc++ -L/mnt/hd/ahimsa/bld-x86-gcc/i686-pc-linux-gnu/libstdc++-v3/src -L/mnt/hd/ahimsa/bld-x86-gcc/i686-pc-linux-gnu/libstdc++-v3/src/.libs -B/mnt/hd/ahimsa/H-x86-gcc/i686-pc-linux-gnu/bin/ -B/mnt/hd/ahimsa/H-x86-gcc/i686-pc-linux-gnu/lib/ -isystem /mnt/hd/ahimsa/H-x86-gcc/i686-pc-linux-gnu/include -nostdinc++ -I/mnt/hd/ahimsa/bld-x86-gcc/i686-pc-linux-gnu/libstdc++-v3/include/i686-pc-linux-gnu -I/mnt/hd/ahimsa/bld-x86-gcc/i686-pc-linux-gnu/libstdc++-v3/include -I/mnt/hd/bliss/src.gcc/gcc/libstdc++-v3/libsupc++ -I/mnt/hd/bliss/src.gcc/gcc/libstdc++-v3/libmath -g -O2 -D_GNU_SOURCE -fno-implicit-templates -Wall -Wno-format -W -Wwrite-strings -Winline -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -c /mnt/hd/bliss/src.gcc/gcc/libstdc++-v3/src/fstream.cc -fPIC -DPIC -o .libs/fstream.o
In file included from /mnt/hd/ahimsa/bld-x86-gcc/i686-pc-linux-gnu/libstdc++-v3/include/ext/stdio_filebuf.h:38,
from /mnt/hd/bliss/src.gcc/gcc/libstdc++-v3/src/ext-inst.cc:35:/mnt/hd/ahimsa/bld-x86-gcc/i686-pc-linux-gnu/libstdc++-v3/include/fstream:448: error: expected
function-definition
/mnt/hd/ahimsa/bld-x86-gcc/i686-pc-linux-gnu/libstdc++-v3/include/fstream:453: error: expected
function-definition
In file included from /mnt/hd/bliss/src.gcc/gcc/libstdc++-v3/src/fstream.cc:35:
/mnt/hd/ahimsa/bld-x86-gcc/i686-pc-linux-gnu/libstdc++-v3/include/fstream:448: error: expected
function-definition
/mnt/hd/ahimsa/bld-x86-gcc/i686-pc-linux-gnu/libstdc++-v3/include/fstream:453: error: expected
function-definition
make[3]: *** [fstream.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: *** [ext-inst.lo] Error 1
make[3]: Leaving directory `/mnt/hd/ahimsa/bld-x86-gcc/i686-pc-linux-gnu/libstdc++-v3/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/mnt/hd/ahimsa/bld-x86-gcc/i686-pc-linux-gnu/libstdc++-v3'
make[1]: *** [all-recursive-am] Error 2
make[1]: Leaving directory `/mnt/hd/ahimsa/bld-x86-gcc/i686-pc-linux-gnu/libstdc++-v3'
make: *** [all-target-libstdc++-v3] Error 2
<bkoz@fillmore> /mnt/hd/ahimsa/bld-x86-gcc %
>How-To-Repeat:
>Fix:
2003-01-10 Benjamin Kosnik <bkoz@redhat.com>
Sysoltsev Slawa <Vyatcheslav.Sysoltsev@intel.com>
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
/**
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-prs
mailing list