--- Comment #32 from Richard Biener <rguenth at gcc dot> ---
Now the reverse fails - a program compiled with a GCC defaulting to the old ABI
(like GCC 4.8) now fails to run with a dual-ABI libstdc++:

#include <iostream>
#include <fstream>
using namespace std;
int main ()
  std::ifstream pstats;
  pstats.exceptions(ifstream::failbit | ifstream::badbit | ifstream::eofbit);
  try {
      printf("\n Opening file : /proc/0/stat ");"/proc/0/stat");
  catch(ifstream::failure e)
      printf("\n!!Caught ifstream exception!!\n");
      if(pstats.is_open()) {
  return 0;
tmp> g++-4.8 t.C
tmp> ./a.out 

terminate called after throwing an instance of
  what():  basic_ios::clear: iostream error
Aborted (core dumped)
tmp> LD_LIBRARY_PATH=/space/rguenther/install/gcc-6.4/lib64 ./a.out 

 Opening file : /proc/0/stat 
!!Caught ifstream exception!!

Reply via email to