libstdc++/2054: g++-3 rejects legal code, accepted by g++-2.95.2(functors)

Peter Schmid schmid@snake.iap.physik.tu-darmstadt.de
Thu Jun 14 11:45:00 GMT 2001


Excuse me, but the problem is not fixed. Since this is a problem with
the checking code and you changed the default for enabling the
checking code from on to off, this problem is not visible if you do not
explicitly enable the checking code.

If you enable the checking code by defining the preprocessor
symbol _GLIBCPP_CONCEPT_CHECKS, you see that the ts.C code still does
not compile. Therefore, the problem still persists. 

I ask you to change the status of the bug report to suspended.

P.S What about fixing PR libstdc++/943?

Hope this helps,

Peter Schmid

g++ -D_GLIBCPP_CONCEPT_CHECKS -v -o ts ts.C -W -Wall
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0/specs
Configured with: ../gcc/configure --enable-shared --disable-nls --enable-threads=posix --enable-languages=c,c++,f77,objc
Thread model: posix
gcc version 3.0 20010614 (prerelease)
 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0/cc1plus -v -D__GNUC__=3 -D__GNUC_MINOR__=0 -D__GNUC_PATCHLEVEL__=0 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem=posix -D__NO_INLINE__ -D__STDC_HOSTED__=1 -W -Wall -D_GNU_SOURCE -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ -D_GLIBCPP_CONCEPT_CHECKS ts.C -D__GNUG__=3 -D__GXX_DEPRECATED -D__EXCEPTIONS -D__GXX_ABI_VERSION=100 -quiet -dumpbase ts.C -W -Wall -version -o /tmp/ccDNZnVw.s
GNU CPP version 3.0 20010614 (prerelease) (cpplib) (i386 Linux/ELF)
GNU C++ version 3.0 20010614 (prerelease) (i686-pc-linux-gnu)
	compiled by GNU C version 3.0 20010614 (prerelease).
ignoring nonexistent directory "/usr/local/i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include/g++-v3
 /usr/local/include/g++-v3/i686-pc-linux-gnu
 /usr/local/include/g++-v3/backward
 /usr/local/include
 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0/include
 /usr/include
End of search list.
/usr/local/include/g++-v3/bits/boost_concept_check.h: In member function `void 
   __gnu_cxx::_SameTypeConcept<_Tp1, _Tp2>::__constraints() [with _Tp1 = 
   std::string, _Tp2 = int]':
/usr/local/include/g++-v3/bits/boost_concept_check.h:26:   instantiated from `void __gnu_cxx::__function_requires() [with _Concept = __gnu_cxx::_SameTypeConcept<std::string, int>]'
/usr/local/include/g++-v3/bits/stl_algo.h:2207:   instantiated from `_ForwardIter std::lower_bound(_ForwardIter, _ForwardIter, const _Tp&, _Compare) [with _ForwardIter = std::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, _Tp = std::string, _Compare = indirectCompare]'
ts.C:41:   instantiated from here
/usr/local/include/g++-v3/bits/boost_concept_check.h:74: no type named `_Type' 
   in `struct __gnu_cxx::_Aux_require_same<std::string, int>'
/usr/local/include/g++-v3/bits/boost_concept_check.h: In member function `void 
   __gnu_cxx::_BinaryPredicateConcept<_Func, _First, _Second>::__constraints() 
   [with _Func = indirectCompare, _First = std::string, _Second = 
   std::string]':
/usr/local/include/g++-v3/bits/boost_concept_check.h:26:   instantiated from `void __gnu_cxx::__function_requires() [with _Concept = __gnu_cxx::_BinaryPredicateConcept<indirectCompare, std::string, std::string>]'
/usr/local/include/g++-v3/bits/stl_algo.h:2209:   instantiated from `_ForwardIter std::lower_bound(_ForwardIter, _ForwardIter, const _Tp&, _Compare) [with _ForwardIter = std::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, _Tp = std::string, _Compare = indirectCompare]'
ts.C:41:   instantiated from here
/usr/local/include/g++-v3/bits/boost_concept_check.h:354: no match for call to 
   `(indirectCompare) (std::string&, std::string&)'
ts.C:12: candidates are: bool indirectCompare::operator()(int, int) const
ts.C:17:                 bool indirectCompare::operator()(int, const 
   std::string&) const





More information about the Gcc-bugs mailing list