This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug libstdc++/26123] Segmentation fault in constructor of std::ostream::sentry::sentry



------- Comment #2 from pinskia at gcc dot gnu dot org  2006-02-06 12:54 -------
foo.cc has nothing to do with the problem here.  It all has to do with the
order of the execution of the initializers.

The following code is enough to reproduce the issue:
int mkCint();
const int cInt = mkCint();
#include <iostream>
int main()
{
    std::cout << cInt << std::endl;
}
int mkCint()
{
    std::cout << "mkCint()" << std::endl;
    return 2;
}


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26123


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