vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Gilbert Chang wrote: > Got the following error when compiling a generated C++ stub. Is there any > way to increase the limit? Thanks. > > 1540-0872 (S) A string literal cannot be longer than 32765 characters. No. Why on earth does one need a single string longer than 32K? -- Gary R. Hook / AIX PartnerWorld for Developers / These opinions are MINE __________________________________________________ ______________________ |
| |||
| >> Got the following error when compiling a generated C++ stub. Is there any >> way to increase the limit? Thanks. >> >> 1540-0872 (S) A string literal cannot be longer than 32765 characters. > > > No. Why on earth does one need a single string longer than 32K? > Take a look at the generated source. I bet your generator is faulty or the source file is corrupted. If you don't see it in the source, try to approximate by manually calling the stages of compile. --- Uli |
| |||
| "Gary R. Hook" <nospam@nospammers.net> writes: > Gilbert Chang wrote: > > > Got the following error when compiling a generated C++ stub. Is there any > > way to increase the limit? Thanks. > > No. Why on earth does one need a single string longer than 32K? Because xlC (5.0.x.y) uses brain-damaged template name mangling scheme? Gilbert didn't write the string himself -- xlC wrote it for him. Try compiling this test with "xlC -S -g junk.cc" Can you guess the length of the longest .stabx ? (answer at the bottom): --- cut --- junk.cc --- struct allocator { }; struct iterator { }; template <class T, class R, class I> struct Foo { int func(); }; int main() { typedef int T1; typedef Foo<T1, allocator, iterator> T2; typedef Foo<T2, allocator, iterator> T3; typedef Foo<T3, allocator, iterator> T4; T4 f; f.func(); return 0; } --- cut --- junk.cc --- Answer: 186: .stabx "Foo<Foo<Foo<int,allocator,iterator>,allocator,ite rator>,allocator,iterator>:T8=Y1sV(u[f:func__3FooXT3FooXT3FooXTiT9allocatorT8iterator_T 9allocatorT8iterator_T9allocatorT8iterator_Fv:2;;" ,0x00,0x8c,0x0 It only takes a "map<string, map<string, map<string, int> > >" to produce: xlC: 1501-224 fatal error in /usr/vac/exe/dis: signal 11 received The simple "map<string, map<string, int> >" produces a .stabx entry of 3624 characters. Cheers, -- In order to understand recursion you must first understand recursion. Remove /-nsp/ for email. |
| ||||
| Paul Pluzhnikov <ppluzhnikov-nsp@charter.net> wrote in message news:<m34qw698rf.fsf@salmon.parasoft.com>... > "Gary R. Hook" <nospam@nospammers.net> writes: > > > Gilbert Chang wrote: > > > > > Got the following error when compiling a generated C++ stub. Is there any > > > way to increase the limit? Thanks. > > > > No. Why on earth does one need a single string longer than 32K? > > Because xlC (5.0.x.y) uses brain-damaged template name mangling > scheme? > > Gilbert didn't write the string himself -- xlC wrote it for him. > > Try compiling this test with "xlC -S -g junk.cc" > Can you guess the length of the longest .stabx ? (answer at the bottom): > > --- cut --- junk.cc --- > struct allocator { }; > struct iterator { }; > template <class T, class R, class I> struct Foo > { > int func(); > }; > > int main() > { > typedef int T1; > typedef Foo<T1, allocator, iterator> T2; > typedef Foo<T2, allocator, iterator> T3; > typedef Foo<T3, allocator, iterator> T4; > > T4 f; > f.func(); > > return 0; > } > --- cut --- junk.cc --- > > Answer: 186: > .stabx "Foo<Foo<Foo<int,allocator,iterator>,allocator,ite rator>,allocator,iterator>:T8=Y1sV(u[f:func__3FooXT3FooXT3FooXTiT9allocatorT8iterator_T 9allocatorT8iterator_T9allocatorT8iterator_Fv:2;;" ,0x00,0x8c,0x0 > > It only takes a "map<string, map<string, map<string, int> > >" > to produce: > > xlC: 1501-224 fatal error in /usr/vac/exe/dis: signal 11 received > > The simple "map<string, map<string, int> >" produces a .stabx entry > of 3624 characters. > > Cheers, The offending code is in a C++ CORBA stub generated by the IDL compiler. The problem is about string literal, rather than mangled names generated by the C++ compiler. Cheers, Gilbert |