Professional Web Applications Themes

string literal length limit with the AIX c++ compiler - AIX

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. G. Chang...

  1. #1

    Default string literal length limit with the AIX c++ compiler

    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.

    G. Chang


    Gilbert Guest

  2. #2

    Default Re: string literal length limit with the AIX c++ compiler

    Gilbert Chang wrote:
     

    No. Why on earth does one need a single string longer than 32K?

    --
    Gary R. Hook / AIX PartnerWorld for Developers / These opinions are MINE
    __________________________________________________ ______________________

    Gary Guest

  3. #3

    Default Re: string literal length limit with the AIX c++ compiler

     
    >
    >
    > No. Why on earth does one need a single string longer than 32K?
    >[/ref]

    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

    Ulrich--nO--(dot)-sPAM--Link Guest

  4. #4

    Default Re: string literal length limit with the AIX c++ compiler

    "Gary R. Hook" <net> writes:
     
    >
    > No. Why on earth does one need a single string longer than 32K?[/ref]

    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 Guest

  5. #5

    Default Re: string literal length limit with the AIX c++ compiler

    Paul Pluzhnikov <net> wrote in message news:<parasoft.com>... 
    > >
    > > No. Why on earth does one need a single string longer than 32K?[/ref]
    >
    > 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,[/ref]

    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
    Gilbert Guest

Similar Threads

  1. Limit on maximum String length?
    By Heman Robinson in forum Macromedia Flex General Discussion
    Replies: 1
    Last Post: April 19th, 05:34 PM
  2. String Literal Too Long - (less than 4000 chars)
    By Savo in forum Macromedia ColdFusion
    Replies: 0
    Last Post: June 10th, 05:32 PM
  3. Limit to Name Length
    By Laura_MM@adobeforums.com in forum Adobe Acrobat Windows
    Replies: 2
    Last Post: June 1st, 06:33 AM
  4. URL length limit ?
    By FabienV in forum ASP
    Replies: 2
    Last Post: August 11th, 11:48 AM
  5. How to get length of string? length() problems
    By Mitchua in forum PERL Modules
    Replies: 5
    Last Post: July 17th, 12:08 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139