This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Debug mode output broken


Hi everybody,

I have a problem with the debug mode output on Darwin/PowerPC
(and also on SunOS 5.9/Sparc). I compiled, using GCC 3.4.1,
the following program

  #include <vector>

  int main(int, char **) {
    std::vector<int> v;
    v[3] = 2;
  }

and called it. Two strange things happened: first, the
program doesn't stop but continues outputting spaces ' ',
to the error stream. Secondly, the error message (which
appears before the spaces) lacks some information:

bash$ ./tmp 2>&1 | more
/Users/hbf/sw/gcc-3.4.1/lib/gcc/powerpc-apple-darwin7.4.0/3.4.1/../../../
../include/c++/3.4.1/debug/vector:192:
    error:     
    attempt to subscript container with out-of-bounds index %2;, but 
container only holds %3; elements    
    to subscript container with out-of-bounds index %2;, but container 
only holds %3; elements    
    subscript container with out-of-bounds index %2;, but container only 
holds %3; elements
   *** many more spaces ***

Btw, if I compile the program using Apple's GCC version
I get a "errorless error" message

/usr/include/gcc/darwin/3.3/c++/debug/dbg_vector.h:193:error: attempt to 
    subscript container with out-of-bounds index 3, but container only     
    holds 0 elements.

So my conclusion is that I misconfigured GCC 3.4.1
when I compiled it. Does anybody know what I've done
wrong? I tried configuring with --enable-__cxa_atexit
but this didn't help.

Thanks,
Kaspar

-- 
NEU: WLAN-Router für 0,- EUR* - auch für DSL-Wechsler!
GMX DSL = supergünstig & kabellos http://www.gmx.net/de/go/dsl


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]