https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21334
Tim O'Neil <tim at matterfab dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tim at matterfab dot com --- Comment #49 from Tim O'Neil <tim at matterfab dot com> --- In the hope this will help, I try to stay pretty current: --- $ clang++ --version Ubuntu clang version 3.5-1ubuntu1 (trunk) (based on LLVM 3.5) Target: x86_64-pc-linux-gnu Thread model: posix $ clang++ -Wall -std=c++11 bugtest.c -o bugtest clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated $ ./bugtest terminate called after throwing an instance of 'std::length_error' what(): basic_string::_S_create Aborted [Exit 134 SIGABRT] $ clang++ -Wall -std=c++11 -stdlib=libc++ bugtest.c -o bugtest clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated $ ./bugtest $ g++ --version g++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2 Copyright (C) 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ g++ -Wall -std=c++11 bugtest.c -o bugtest $ ./bugtest terminate called after throwing an instance of 'std::length_error' what(): basic_string::_S_create Aborted [Exit 134 SIGABRT] $