[v3] support for disabling concept checking
Benjamin Kosnik
bkoz@redhat.com
Fri Mar 23 12:00:00 GMT 2001
The current concept checking code is buggy. This doesn't turn it off,
but it does allow one to turn it off and have the library still build
and link properly.
2001-03-22 Benjamin Kosnik <bkoz@redhat.com>
* src/misc-inst.cc (__sink_unused_warning): Move to...
* src/locale-inst.cc (__sink_unused_warning): Move to...
* src/stl-inst.cc: Here.
* include/bits/c++config (_STL_NO_CONCEPT_CHECKS): Add define,
commented it out.
Index: include/bits/c++config
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/c++config,v
retrieving revision 1.15
diff -c -p -r1.15 c++config
*** c++config 2001/03/04 21:34:00 1.15
--- c++config 2001/03/23 19:58:52
***************
*** 65,70 ****
--- 65,71 ----
// Concept-checking code is on by default unless users define
// the _STL_NO_CONCEPT_CHECKS hook.
+ #define _STL_NO_CONCEPT_CHECKS 1
#if !defined(_STL_NO_CONCEPT_CHECKS)
# define __STL_USE_CONCEPT_CHECKS
#endif
Index: src/locale-inst.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/src/locale-inst.cc,v
retrieving revision 1.16
diff -c -p -r1.16 locale-inst.cc
*** locale-inst.cc 2001/03/04 21:34:02 1.16
--- locale-inst.cc 2001/03/23 19:58:54
***************
*** 44,50 ****
namespace std
{
-
typedef ostreambuf_iterator<char, char_traits<char> > obuf_iterator;
typedef istreambuf_iterator<char, char_traits<char> > ibuf_iterator;
typedef ostreambuf_iterator<wchar_t, char_traits<wchar_t> > wobuf_iterator;
--- 44,49 ----
*************** namespace std
*** 285,293 ****
(wostreambuf_iter, ios_base &, wchar_t, bool, unsigned long long);
#endif
#endif // _GLIBCPP_USE_WCHAR_T
-
- template
- void __sink_unused_warning<locale::facet*>(locale::facet*);
template
locale::facet**
--- 284,289 ----
Index: src/misc-inst.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/src/misc-inst.cc,v
retrieving revision 1.9
diff -c -p -r1.9 misc-inst.cc
*** misc-inst.cc 2001/03/04 21:34:02 1.9
--- misc-inst.cc 2001/03/23 19:58:55
*************** namespace std
*** 243,268 ****
template
void
- __sink_unused_warning<char>(char);
- #ifdef _GLIBCPP_USE_WCHAR_T
- template
- void
- __sink_unused_warning<wchar_t>(wchar_t);
- #endif
-
- template
- void
- __sink_unused_warning<ostreambuf_iterator<char> >
- (ostreambuf_iterator<char>);
- #ifdef _GLIBCPP_USE_WCHAR_T
- template
- void
- __sink_unused_warning<ostreambuf_iterator<wchar_t> >
- (ostreambuf_iterator<wchar_t>);
- #endif
-
- template
- void
__pad_char(basic_ios<char>&, char*, const char*,
const streamsize, const streamsize);
#ifdef _GLIBCPP_USE_WCHAR_T
--- 243,248 ----
Index: src/stl-inst.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/src/stl-inst.cc,v
retrieving revision 1.5
diff -c -p -r1.5 stl-inst.cc
*** stl-inst.cc 2001/03/04 21:34:02 1.5
--- stl-inst.cc 2001/03/23 19:58:55
***************
*** 1,6 ****
// Explicit instantiation file.
! // Copyright (C) 1999 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
--- 1,6 ----
// Explicit instantiation file.
! // Copyright (C) 1999, 2001 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
***************
*** 34,39 ****
--- 34,40 ----
#include <bits/c++config.h>
#include <bits/stl_alloc.h>
#include <bits/std_vector.h>
+ #include <bits/std_ostream.h>
namespace std
{
*************** namespace std
*** 49,56 ****
vector<unsigned int>::
_M_insert_aux(vector<unsigned int>::iterator, unsigned int const &);
template
! void
! __sink_unused_warning<unsigned int>(unsigned int);
} //std
--- 50,76 ----
vector<unsigned int>::
_M_insert_aux(vector<unsigned int>::iterator, unsigned int const &);
+ #ifdef __STL_USE_CONCEPT_CHECKS
template
! void __sink_unused_warning<unsigned int>(unsigned int);
!
! template
! void __sink_unused_warning<locale::facet*>(locale::facet*);
+ template
+ void __sink_unused_warning<char>(char);
+
+ template
+ void __sink_unused_warning<ostreambuf_iterator<char> >
+ (ostreambuf_iterator<char>);
+
+ # ifdef _GLIBCPP_USE_WCHAR_T
+ template
+ void __sink_unused_warning<wchar_t>(wchar_t);
+
+ template
+ void __sink_unused_warning<ostreambuf_iterator<wchar_t> >
+ (ostreambuf_iterator<wchar_t>);
+ # endif
+ #endif
} //std
More information about the Gcc-patches
mailing list