Subject: [PATCH] 2nd patch Re: [Jade/OpenJade] g++ 2.95 C++ portability problems From: Adam Di Carlo <adam@xxxxxxxxxxx> Date: 16 Aug 1999 13:03:17 -0400 |
Carlos Villegas <cav@xxxxxxxxxxxxxx> writes: > I had problems in some of the template instantiation files > (*_inst.cxx), something about duplicate instantiations and had to > comment out some of them in *_inst.m4. Yes. I am no C++ hacker, and C++ template instantiation issues are frankly beyond my ken. Included is a patch to jade (not OpenJade, but I assume it's similar) which fixes said problems for g++ 2.95. My patches here are a far cry from optimal. In some cases, such as __instantiate(Vector<size_t>) __instantiate(Vector<unsigned int>) we need to know if size_t really == unsigned int. There's no way I know of to know that using CPP macros. I guess this sorta stuff is known issues with C++, see the info pages under Template Instantiation for details. I guess we might be able to work around better by frobbing switches such as -frepo and -fno-implicit-templates. All I can say is, WFM (works for me). YMMV. -- .....Adam Di Carlo....adam@xxxxxxxxxxxxxxxx<URL:http://www.onShore.com/> Index: MifFOTBuilder_inst.m4 =================================================================== RCS file: /usr/local/cvs/debian/jade/jade/MifFOTBuilder_inst.m4,v retrieving revision 1.1.1.1 diff -u -u -r1.1.1.1 MifFOTBuilder_inst.m4 --- MifFOTBuilder_inst.m4 1998/09/23 22:29:08 1.1.1.1 +++ MifFOTBuilder_inst.m4 1999/08/16 16:30:38 @@ -39,7 +39,9 @@ __instantiate(Vector<MifDoc::Object*>) __instantiate(Vector<MifDoc::T_XY>) __instantiate(Vector<MifDoc::CrossRefInfo>) +#if __GNUC__ != 2 && __GNUC_MINOR__ != 95 __instantiate(Vector<MifDoc::ElementSet::SgmlIdInfo*>) +#endif __instantiate(`PointerTable<MifDoc::Ruling*, String<char>, StringHash, MifDoc::Ruling>') __instantiate(`PointerTableIter<MifDoc::Ruling*, String<char>, StringHash, MifDoc::Ruling>') __instantiate(Vector<MifDoc::Ruling*>) === Exit status: 1 === cd /home/apharris/debian/jade/jade/lib/ === /usr/bin/cvs diff -u entmgr_inst.m4 parser_inst.m4 Index: entmgr_inst.m4 =================================================================== RCS file: /usr/local/cvs/debian/jade/lib/entmgr_inst.m4,v retrieving revision 1.1.1.3 diff -u -u -r1.1.1.3 entmgr_inst.m4 --- entmgr_inst.m4 1998/10/20 05:49:32 1.1.1.3 +++ entmgr_inst.m4 1999/08/16 09:07:15 @@ -61,7 +61,9 @@ __instantiate(`RangeMap<WideChar,UnivChar>') __instantiate(Vector<InputSourceOriginNamedCharRef>) __instantiate(Vector<StringC>) +#if __GNUC__ != 2 && __GNUC_MINOR__ != 95 __instantiate(Vector<String<EquivCode> >) +#endif __instantiate(Owner<ExternalInfo>) __instantiate(ISet<Char>) __instantiate(Vector<ISetRange<Char> >) @@ -71,16 +73,24 @@ __instantiate(Vector<ISetRange<WideChar> >) __instantiate(SubstTable<Char>) __instantiate(SharedXcharMap<PackedBoolean>) +#if __GNUC__ != 2 && __GNUC_MINOR__ != 95 __instantiate(SharedXcharMap<unsigned char>) +#endif __instantiate(SharedXcharMap<EquivCode>) +#if __GNUC__ != 2 && __GNUC_MINOR__ != 95 __instantiate(String<EquivCode>) +#endif __instantiate(String<SyntaxChar>) __instantiate(XcharMap<PackedBoolean>) +#if __GNUC__ != 2 && __GNUC_MINOR__ != 95 __instantiate(XcharMap<unsigned char>) +#endif __instantiate(XcharMap<EquivCode>) __instantiate(Vector<char>) +#if __GNUC__ != 2 && __GNUC_MINOR__ != 95 __instantiate(Vector<PackedBoolean>) __instantiate(SubstTable<Char>) +#endif __instantiate(CharMap<Unsigned32>) #ifdef SP_MULTI_BYTE __instantiate(CharMapPage<Unsigned32>) Index: parser_inst.m4 =================================================================== RCS file: /usr/local/cvs/debian/jade/lib/parser_inst.m4,v retrieving revision 1.1.1.2 diff -u -u -r1.1.1.2 parser_inst.m4 --- parser_inst.m4 1998/07/13 21:30:07 1.1.1.2 +++ parser_inst.m4 1999/08/16 14:54:18 @@ -165,7 +165,10 @@ __instantiate(Vector<Transition>) __instantiate(Vector<LeafContentToken*>) __instantiate(Vector<size_t>) + // we really just want to test if size_t == unsigned int +#if __GNUC__ != 2 && __GNUC_MINOR__ != 95 __instantiate(Vector<unsigned int>) +#endif __instantiate(NamedTable<Id>) __instantiate(NamedTableIter<Id>) DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[PATCH] [Jade/OpenJade] g++ 2.95 C+, Adam Di Carlo | Thread | Re: [PATCH] 2nd patch Re: [Jade/Ope, Matthias Clasen |
Re: Interesting problem, Toby Speight | Date | Re: About OpenJade and Debian, Adam Di Carlo |
Month |