g++ string array in struct crash

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

g++ string array in struct crash

Graeme
This crashes mingw g++ (GCC) 4.8.1, hangs linux - with bigger array.

>g++ stringArray.cc

#include <string>
struct T {
   std::string s[4065];
};
int main() {
   T m = {"x", "y"};
}