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]

Re: multithreaded EH is still broken on Linux/Alpha and other platforms


>>>>> H J Lu <hjl@lucon.org> writes:

 >> >>>>> Jason Merrill writes:
 >> 
 >> >>>>> H J Lu <hjl@lucon.org> writes:
 >> >> The Linux/x86 EH bug has nothing to do with thread.
 >> 
 >> > No, it has to do with you forgetting to define the copy constructor.

 > The bug is in /omniORB-980827. Here is the patch. I don't know why

 > static omni_thread::init_t omni_thread_init;

 > is in the header file.

So that anything that #includes the header is guaranteed that the
thread stuff will have been initialized.  This is a common C++ idiom; it's
even used by many iostream implementaitons.

 > It seems ok for compiler to generate

 > static omni_thread::init_t omni_thread_init;

 > for each source file which includes that header file.

I don't understand you.  Your patch just moves the line from the header
into the .cc files, which is unmaintainable.  Why is it useful?

Jason


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