libstdc++/1886: Some .tcc files not includedImplementation missing for __basic_file<> template class.

bumgard@roguewave.com bumgard@roguewave.com
Sun Apr 1 00:00:00 GMT 2001


>Number:         1886
>Category:       libstdc++
>Synopsis:       Some .tcc files not includedImplementation missing for __basic_file<> template class.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Feb 06 00:26:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Gregory Bumgardner
>Release:        2.97 (latest)
>Organization:
>Environment:
N/A
>Description:
The instantiation of the std::basic_filebuf<> class produces
an instantiation of the internal std::__basic_file<> class.

However, no implementation of the std::__basic_file<> class is
is included by the libstdc++ header files. This prevents the
user from defining new instantiations of the basic_filebuf<>
class.

The implementation does exist, but is located in the file:
/gcc/libstdc++-v3/config/c_io_stdio.cc, which only exists
within in the library source tree.

This seems strange, as there doesn't really seem to be a 
connection between this .cc file and the .h file of the 
same name.
>How-To-Repeat:
Instantiate the std::basic_filebuf using a character type
other than char or whar_t.A link will fail with unresolved
symbols declared by the __basic_file class.
>Fix:
Move c_io_stdio.cc to bits/basic_file.tcc and add a
#include for this file to the end of bits/basic_file.h.

This include should be guarded the same as all other .tcc 
includes:

...
#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
#define export
#ifdef _GLIBCPP_FULLY_COMPLIANT_HEADERS
#include <bits/basic_file.tcc>
#endif
#endif
...
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the Gcc-prs mailing list