[GCC-XML] Error using msvc6

Vaidya, Jalil jalil.vaidya at wachovia.com
Tue Nov 27 14:00:03 EST 2007


Hi,

I have sample code that uses a map of CString objects where CString is a
class derived from std::basic_string and uses a custom defined
case_insensitive_traits. The CString code is in CString.h and the class
using it is in MapOfCString.h. I have attached both the files (My
apologies if the attachments to mailing lists are considered
inappropriate). 

I am using 0.7 version of GCC-XML. When MapOfCString.h is parsed using
msvc6 as compiler setting then I get following error. The same header is
parsed using msvc8 compiler setting without any errors. 

C:\Dev\C++\gccxml\GCCXMLComplete\bin>gccxml --gccxml-compiler msvc6
C:\Dev\C++\GccXmlTest\MapOfCString.h
-fxml=C:\Dev\C++\GccXmlTest\MapOfCString.vc6.
xml
C:/Dev/C++/gccxml/GCCXMLComplete/share/gccxml-0.7/Vc6/Include/xtree: In
static
   member function `static const _K& std::_Tree<_K, _Ty, _Kfn, _Pr,
   _A>::_Key(std::_Tree<_K, _Ty, _Kfn, _Pr, _A>::_Node*) [with _K =
CString,
   _Ty = std::pair<const CString, std::string>, _Kfn = std::map<CString,
   std::string, std::less<CString>, std::allocator<std::string> >::_Kfn,
_Pr =
   std::less<CString>, _A = std::allocator<std::string>]':
C:/Dev/C++/gccxml/GCCXMLComplete/share/gccxml-0.7/Vc6/Include/xtree:514:
instantiated from `std::_Tree<_K, _Ty, _Kfn, _Pr, _A>::_Node*
std::_Tree<_K
, _Ty, _Kfn, _Pr, _A>::_Lbound(const _K&) const [with _K = CString, _Ty
= std::pair<const CString, std::string>, _Kfn = std::map<CString,
std::string,
 std::less<CString>, std::allocator<std::string> >::_Kfn, _Pr =
std::less<CString>, _A = std::allocator<std::string>]'
C:/Dev/C++/gccxml/GCCXMLComplete/share/gccxml-0.7/Vc6/Include/xtree:401:
instantiated from `std::_Tree<_K, _Ty, _Kfn, _Pr, _A>::const_iterator
std::
_Tree<_K, _Ty, _Kfn, _Pr, _A>::lower_bound(const _K&) const [with _K =
CString, _Ty = std::pair<const CString, std::string>, _Kfn =
std::map<CString,
std::string, std::less<CString>, std::allocator<std::string> >::_Kfn,
_Pr = std::less<CString>, _A = std::allocator<std::string>]'
C:/Dev/C++/gccxml/GCCXMLComplete/share/gccxml-0.7/Vc6/Include/xtree:389:
instantiated from `std::_Tree<_K, _Ty, _Kfn, _Pr, _A>::const_iterator
std::
_Tree<_K, _Ty, _Kfn, _Pr, _A>::find(const _K&) const [with _K = CString,
_Ty = std::pair<const CString, std::string>, _Kfn = std::map<CString,
std::st
ring, std::less<CString>, std::allocator<std::string> >::_Kfn, _Pr =
std::less<CString>, _A = std::allocator<std::string>]'
C:/Dev/C++/gccxml/GCCXMLComplete/share/gccxml-0.7/Vc6/Include/map:123:
instantiated from `typename std::_Tree<_K, std::pair<const _K, _Ty>,
std::map
<_K, _Ty, _Pr, _A>::_Kfn, _Pr, _A>::const_iterator std::map<_K, _Ty,
_Pr, _A>::find(const _K&) const [with _K = CString, _Ty = std::string,
_Pr = std:
:less<CString>, _A = std::allocator<std::string>]'
C:/Dev/C++/GccXmlTest/MapOfCString.h:30:   instantiated from here
C:/Dev/C++/gccxml/GCCXMLComplete/share/gccxml-0.7/Vc6/Include/xtree:38:
error: invalid
   cast to function type `std::map<CString, std::string,
std::less<CString>,
   std::allocator<std::string> >::_Kfn ()()'

C:\Dev\C++\gccxml\GCCXMLComplete\bin>gccxml --gccxml-compiler msvc8
C:\Dev\C++\GccXmlTest\MapOfCString.h
-fxml=C:\Dev\C++\GccXmlTest\MapOfCString.vc8.
xml

C:\Dev\C++\gccxml\GCCXMLComplete\bin>


The code compiles just fine in both VC6 and VC8 (VS2005). Any ideas on
how to get this working with msvc6? Any help is much appreciated.

Thanks,

Jalil Vaidya

-------------- next part --------------
A non-text attachment was scrubbed...
Name: CString.h
Type: application/octet-stream
Size: 2329 bytes
Desc: CString.h
URL: <http://public.kitware.com/pipermail/gccxml/attachments/20071127/f677c02c/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MapOfCString.h
Type: application/octet-stream
Size: 862 bytes
Desc: MapOfCString.h
URL: <http://public.kitware.com/pipermail/gccxml/attachments/20071127/f677c02c/attachment-0001.obj>


More information about the gccxml mailing list